@ProperCase (JavaScript)

Converts a string to propercase.

Defined in

@Functions (JavaScript)

Syntax

@ProperCase(value:string) : string
Parameter Description
value A string or array of strings.
Return value Description
string The converted string or array of strings.

Usage

This function affects alphabetic characters in the string changing the first alphabetic character to uppercase and all others to lowercase.

If the parameter is an array, the result is an array with all elements converted.

Examples

This example converts elements of a list to proper case..
function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var cities = new Array("PARIS", "BERLIN", "lonDon", "mosCow");

cities = @ProperCase(cities);
for(var i = 0; i < cities.length; i++) {
	p(i + " " + cities[i]);
}
/*
<<<0 Paris>>>
<<<1 Berlin>>>
<<<2 London>>>
<<<3 Moscow>>>
*/