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: Copy
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
 
Use IndexOf for searching and Set to put some value to a known index.
 
Upvote 0
B4X: Copy
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
Back
Top