EMS.String

Contains convenience functions for string manipulation.  This extends OpenLayers.String.

Summary
EMS.StringContains convenience functions for string manipulation.
Static Functions
capitalizeCapitalizes the first letter of each word in a string.
isNullOrEmpty
emptyToNull
nullToEmpty

Static Functions

capitalize

EMS.String.capitalize = function(string)

Capitalizes the first letter of each word in a string.

Parameters

string{String} is the string to capitalize.

Returns

{String} A string with the first letter of each word capitalized.

isNullOrEmpty

EMS.String.isNullOrEmpty = function(string)

Parameters

string{String} is the string to test for null or emptiness.

Returns

{Boolean} Returns true if the input string is either null or empty.

emptyToNull

EMS.String.emptyToNull = function(string)

Parameters

string{String} is the string to test and possibly return.

Returns

{String} Returns the input string if it was non empty, null otherwise.

nullToEmpty

EMS.String.nullToEmpty = function(string)

Parameters

string{String} is the string to test and possibly return.

Returns

{String} Returns the input string if it was non empty or not null, empty string otherwise.

EMS.String.capitalize = function(string)
Capitalizes the first letter of each word in a string.
EMS.String.isNullOrEmpty = function(string)
EMS.String.emptyToNull = function(string)
EMS.String.nullToEmpty = function(string)
Contains convenience functions for string manipulation.
Close