Android Question How to find a text in a string by position

select

Member
Licensed User
Longtime User
i'm looking for a way to find same text in a particular position of a string.

This is an example:
MyString = "The book is on the table"
find character from position 5 to position 8
Result = "book"

It's possibile?
 

eurojam

Well-Known Member
Licensed User
Longtime User
yes it is!

B4X:
 Dim mystring As String   
mystring = "The book is on the table"
Log(mystring.SubString2(4,8))
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Finding the text "book" proved easy enough..but finding the textbook could eventually be a real challenge if you don't specify which table you're talking about! :D

Sorry, couldn't resist.
 
Upvote 0
Top