StringUtils.js

Summary
StringUtils.js
Functions
startsWithChecks if given strings starts with a certain prefix.
trimRemoves leading and trailing whitespace characters from a string.
isEmptyChecks if given string is empty.

Functions

startsWith

startsWith : function(string,
prefix)

Checks if given strings starts with a certain prefix.

Parameters

string{String} String to check.
prefix{String} Prefix.

trim

trim : function(string)

Removes leading and trailing whitespace characters from a string.

Parameters

string{String} The (potentially) space padded string.  This string is not modified.

Returns

{String} A trimmed version of the string with all leading and trailing spaces removed.

isEmpty

isEmpty : function(string)

Checks if given string is empty.

Returns

true if the string is null, undefined or empty, false otherwise.

Parameters

stringstring to check.
startsWith : function(string,
prefix)
Checks if given strings starts with a certain prefix.
trim : function(string)
Removes leading and trailing whitespace characters from a string.
isEmpty : function(string)
Checks if given string is empty.