I have not found anything on the subject in the community and Google unfortunately.
Thanks
EDIT:
i have found....sorry for the Question.
B4X:
Dim myList As List
myList.Initialize
Dim myString As String = "This is a long string which will be split into individual set size strings"
Wordwrap(myString, 13)
Sub Wordwrap (str As String, count As Int)
myList.Clear
str = str.Replace(" ", "")
For i = 0 To str.Length - count Step count
myList.Add(str.SubString2(i, i + count))
Next
'add remainder of string
myList.Add(str.SubString(i))
End Sub
You could use regular expressions too. A pattern like
.{13}
matches blocks of 13 chars (including spaces), so you could use it to return each block, append a newline code and so on until the last block which could be less than "13" but you know it in advance.
A quick example in B4J
B4X:
Dim myList As List
myList.Initialize
Dim myString As String = "This is a long string which will be split into individual set size strings"
Dim pattern As String = ".{13}"
myList = Regex.Split(pattern, myString)
Log(myList.Size)
Log(myList.Get(myList.Size-1))