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
Longtime User
Use IndexOf for searching and Set to put some value to a known index.
 
Upvote 0

Biswajit

Active Member
Licensed User
Longtime 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
 
Upvote 0
Top