strPad

strPad ( string text , int length , string padCar , string _padDirection ) : string

Pad a string to a certain length with another string.

Example



	paddedTextRight = strPad("Hello", 10, " ", "right")
console(paddedTextRight) //-> "Hello "

paddedTextLeft = strPad("Hello", 10, " ", "left")
console(paddedTextLeft) //-> " Hello"

Parameters

text

to pad

length

padCar

_padDirection (optional)

• right (default)
• left