comp • gb.util • string • padright

String.PadRight (gb.util)

Static Function PadRight ( String As String, Length As Integer [ , Pad As String ] ) As String

Since 3.15

Returns a new string that left-aligns the characters in the original string by padding them on the right with a specified string pattern, for a specified total length.

  • String is the string to pad.

  • Length is the final length in UTF-8 characters.

  • Pad is the string pattern used for padding. By default, a space is used.


Use "gb.util"  'For Gambas Script Only

Print String.PadRight("Gambas", 10, ".")
Use "gb.util"  'For Gambas Script Only

Print String.PadRight("Gambas", 16, "×->")