Android Question equivalent of "hello" & space(4) & world in B4A ?

Mahares

Expert
Licensed User
Longtime User
Taking hints from of Erel's and NJDude's here is another small example:

B4X:
Dim strVar As String
strVar="Erel"
strVar=strVar & Space(10,"*")
Msgbox(strVar,"") 'displays Erel**********
strVar="NJDude"
strVar=strVar & Space(5,"!")
Msgbox(strVar,"") 'displays NJDude!!!!!

B4X:
Sub Space(Length As Int, Character As String) As String
Dim sb As StringBuilder
sb.Initialize
For i = 1 To Length
sb.Append(Character)
Next
Return sb.ToString
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…