Strings are immutable objects. You shouldn't concatenate 81920 characters one by one. It will be slow.
You should use StringBuilder instead.
Or another option:
B4X:
Sub CreateSpace(Length As Int) As String
Dim b(Length) As Byte
Dim s As Int = Asc(" ")
For i = 0 To b.Length - 1
b(i) = s
Next
Return BytesToString(b, 0, b.Length, "ASCII")
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.