B4J Question Library for space set in the string

strupp01

Active Member
Licensed User
Longtime User
Is there a library, z.B. 20 Space behind a string?

Example: Ergebnis = Taste & space (20)
 

stevel05

Expert
Licensed User
Longtime User
It doesn't appear to be available as a utility in java.

Try this:

B4X:
Public Sub StrRepeat(Str As String, Count As Int) As String
    Dim SB As StringBuilder
    SB.Initialize
    For i = 0 To Count - 1
        SB.Append(Str)
    Next
    Return SB.ToString
End Sub

Use:

B4X:
Log("Test" & StrRepeat(" ",20) & "***")
 
Upvote 0
Top