Android Question error in CharAt

MhdBoy

Member
Licensed User
Longtime User
Hi there,
i have problem with String CharAt method in my app.
my code:
Dim sText as String = " <b> "
If sText.CharAt(i) = "<" Then
If sText.SubString2(0,i) <> "" Then
Log(sText.SubString2(0,i))
End If
End If

error:
0.556841001440796913-Capture.JPG

how i can fix this error?!

tnx a lot
 

HotShoe

Well-Known Member
Licensed User
Longtime User
I'd guess that you are using a for loop to go through the string like:

for i = 0 to stext.length

where it should be:

for i = 0 to stext.length - 1

Hard to know without seeing more of the sub though.

--- Jem
 
Upvote 0
Top