-
Notifications
You must be signed in to change notification settings - Fork 12
String.PadStart
boxgaming edited this page Aug 5, 2025
·
1 revision
Pads a string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. The padding is applied from the start of this string.
result$ = String.PadStart (s$, targetLength% [,__padStr%_])
- The s$ parameter contains the string to pad.
- targetLength% specifies the length of the resulting string once the current str has been padded.
- The optional padStr$ parameter contains the string to pad the current s$ with. If padStr$ is too long to stay within targetLength%, it will be truncated from the end. The default value is the space character.
Import String From "lib/lang/string.bas"
Print String.PadStart("9302", 8, "0")00009302