String to add padding to
Length of the result, in grapheme clusters. If it is less than or equal to
stringLength(string), the string is returned as is
OptionalpadString: stringThe string to pad with, truncated to fit targetLength. Default is " "
String with the appropriate padding at the start
RangeError when targetLength exceeds MAX_PADDING_LENGTH and padding would
actually be added. This ceiling is lower than native's; see MAX_PADDING_LENGTH.
This function mirrors the
padStartfunction from the JavaScript Standard String object. It operates on grapheme clusters instead of UTF-16 code units.Pads the string with another string (multiple times, if needed) until the result is
targetLengthgrapheme clusters long. The padding is applied at the start.