Android Question Search the list

Mrphone

Member
Hello everyone :D

I have a text (.txt) file that I will convert to a list using the following command 👇
CODE:
Dim data as list
data.Initialize
data = File.ReadList(File.DirAssets,"Number.txt")

How can I search in this list ??!
And put the result back on the list
 

Biswajit

Active Member
Licensed User
Use IndexOf for searching and Set to put some value to a known index.
 

Biswajit

Active Member
Licensed User
B4X:
Dim l as list
l.Add("abc")
l.Add("efg")

log(l.IndexOf("abc")) 'output: 0

log(l.Get(1)) 'output: efg
l.Set(1,"xyz")
log(l.Get(1)) 'output: xyz
 
Top