ocalle Active Member Licensed User Longtime User Jan 31, 2018 #1 Hello, In other languages i have this fuctions to handle strings, can you say which are like that? I used Left, Right and Middle U have an string as "abcdefg" name chain and Left(chain, 2) give "a" Right(chain,2) give "g" and Middle(chain,3,2) gives "cd" Need know how handle this, i need parse some incoming strings Best regards Osvaldo
Hello, In other languages i have this fuctions to handle strings, can you say which are like that? I used Left, Right and Middle U have an string as "abcdefg" name chain and Left(chain, 2) give "a" Right(chain,2) give "g" and Middle(chain,3,2) gives "cd" Need know how handle this, i need parse some incoming strings Best regards Osvaldo
eurojam Well-Known Member Licensed User Longtime User Jan 31, 2018 #2 this can be done in B4A with substring and substring2 Upvote 0
eurojam Well-Known Member Licensed User Longtime User Jan 31, 2018 #3 example: B4X: Dim s = "abcdefg" Log(s.SubString2(0,1)) 'left(1) Log(s.SubString(s.Length-1)) 'right(1) Log(s.SubString2(2,4)) 'middle(2,3) Upvote 0
example: B4X: Dim s = "abcdefg" Log(s.SubString2(0,1)) 'left(1) Log(s.SubString(s.Length-1)) 'right(1) Log(s.SubString2(2,4)) 'middle(2,3)
ocalle Active Member Licensed User Longtime User Jan 31, 2018 #4 Dim grats="ManyThanksGreat!" log(s.substring2(4,5)) Upvote 0