CJustify

Returns the given string justified to the center, padding out the words with spaces accordingly

CJustify( string, length )

Returns: String

Argument Description
string
string, required

May be empty. If it is a variable that is defined as a number, the function processes it as a string.

length
number, required

A positive integer. Length of field.

Examples

string = "A light-weight dynamic scripting language for the JVM.";
dump(cJustify(string, 5));
// member function
dump(string.cJustify(5));

See also