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)
 
It doesn't appear to be available as a utility in java.

Try this:

Code: Copy
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:

Code: Copy
Log("Test" & StrRepeat(" ",20) & "***")
 
Upvote 0
Back
Top