padleft — prefix a string up to a specified length
string padleft( |
str, | |
length, | ||
padding) ; |
string | str; |
int | length; |
string | padding ; |
If strlen(str) > length then str is returned unaltered. Otherwise the string padding is continuously concatenated to the front of str until it is exactly length characters long. Note that this may mean that the final concatenation of padding may be truncated.
If the optional parameter padding is omitted then the string " " (a single space) is used as padding.
If padding has zero length or length < 0 then the result is undefined, probably a run time error.