Android Question Load a text file into an array

romill

Member
Licensed User
Longtime User
Hi

Im trying to load each line of a text file into an array. For example...

12
19
26
29
32

Would be the text file and as a result array(0) would be 12, array(1) would be 19, etc.

I found how to do this with lists, but how would I do this with an array?
 

rbsoft

Active Member
Licensed User
Longtime User
You can use Regex.Split

B4X:
Dim a() As String
Dim t As String

t = "12" & CRLF & "19" & CRLF & "26" & CRLF & "29" & CRLF & "32"
a = Regex.Split(CRLF,t)

Rolf
 
Last edited:
Upvote 0
Top