Manuals/calci/ZeroPad
Jump to navigation
Jump to search
ZeroPad(String,PadWith,PadLength)
- where is the input string,
- is the number or a string or a character with which the given string is to be padded.
- is the total length of the resultant string.
Description
- This function pads the given string with mentioned string or character or number till is satisfied.
- For non-numeric value of , it should be mentioned in double quotes.
e.g ZeroPad("##",4,6) displays 4444##.
- can be a number, a character or a string. Non-numeric value should be mentioned in double quotes.
e.g ZeroPad(55,"z",9) displays zzzzzzz55.
- If is lesser than the actual length of the string, it is ignored and the string is displayed as it is.
e.g ZeroPad(567,"z",1) displays 567.
Examples
- =ZeroPad(4,0,6) = 000004
- =ZeroPad(678,"a",8) = aaaaa678
- =ZeroPad("#@$",1,5) = 11#@$
- =ZeroPad(99,45.5,5) = 45.545.545.599
- =ZeroPad("World","Hello",15) = HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloWorld
Related Video
See Also
References