me.utils.string

a collection of string utility functions

Methods

static isBoolean(string) → {Boolean}

returns true if the given string contains a true or false

Parameters:
Name Type Description
string String

the string to be tested

Returns:
Boolean -

true if the string is either true or false

static isNumeric(string) → {Boolean}

returns true if the given string contains a numeric value

Parameters:
Name Type Description
string String

the string to be tested

Returns:
Boolean -

true if string contains only digits

static toHex(string) → {String}

convert a string to the corresponding hexadecimal value

Parameters:
Name Type Description
string String

the string to be converted

Returns:
String

static trimLeft(string) → {string}

returns the string stripped of whitespace from the left.

Parameters:
Name Type Description
string String

the string to be trimmed

Returns:
string -

trimmed string

static trimRight(string) → {string}

returns the string stripped of whitespace from the right.

Parameters:
Name Type Description
string String

the string to be trimmed

Returns:
string -

trimmed string