About Pi Downloads Documentation Plugins Developer Forum Issues

pi.util.String.leftpad

Summary

Returns the string left filled with given string in a string of length

Syntax

pi.util.String.leftpad(string, len,string)

Example

>>> var str = "Foo";
>>> pi.util.String.leftpad(str,5,"#");
"##Foo"
>>> pi.util.String.leftpad(str,10,".");
".......Foo"

See Also