Android Question Reading one char at time from string vars

Gennaro Frungillo

Member
Licensed User
Longtime User
Hi,
in vb.net for do it i write:

B4X:
For Each c as Char in MyTextVar.Chars
  'reading and manipulating a char
Next

How i can do it in VB4A?

Thanks.
 

Gennaro Frungillo

Member
Licensed User
Longtime User
dim OneChar as string
for i = 0 to MyTextVar.Length-1
OneChar = MyTextVar.SubString2(i, i + 1)
next
Grazie Luca! in effetti già avevo adottato questa soluzione ma non mi funzionava quando la stringa a lunghezza 1.....gestendo la cosa ora funge tutto
 
Upvote 0
Top