Delete part of string

Heppy

Active Member
Licensed User
Longtime User
Hello everyone.

In the simplest I've missed.

Let's say I have a string "abcade"

I want to delete "abc" and I stay in the original string "ade"

I can not find a function that is Delete (string, start, end) or something similar.

It will be silly but I can not find the solution

thanks

Sorry for my english, thanks google traductor
 
Last edited:

Heppy

Active Member
Licensed User
Longtime User
B4X:
msg1="666626403"
       tmp=msg1.SubString2(msg1.IndexOf("2"),msg1.IndexOf("3")+1)
      Log(tmp)
      msg1.Replace(tmp,"")
      Log(msg1)

Log(tmp)=26403
log(msg1)=666626403
Not work replace?
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
B4X:
Dim msg1,tmp As String
 msg1="666626403"
 tmp=msg1.SubString2(msg1.IndexOf("2"),msg1.IndexOf ("3")+1)
 Msgbox(tmp,"") 'retruns 26403
 msg1= msg1.Replace(tmp,"")
 Msgbox(msg1,"")  'returns 6666
 
Upvote 0
Top