iOS Question How to insert a string into a textview at a spesific position?

OlavRossland

Member
Licensed User
Longtime User
How can I insert a string into a textview at a spesific position?

Example:
TextView.Text="This is a text"
...code for insert a string at ex. position 9 (ex. " NEW")

Result:
TextView.Text="This is a NEW text"
 

PaulMeuris

Active Member
Licensed User
In the B4X language booklet you can read at page 96 and 97 how to use a stringbuilder object.
B4X:
    Private strtext As String = "This is a test"
    Private sb As StringBuilder
    sb.Initialize
    sb.Append(strtext)
    sb.Insert(9," NEW")
    Log(sb.ToString)
 
Upvote 0
Top