utils.string

namespace string

a collection of string utility functions

Summary


Public Methods


capitalize string.js:6
capitalize(str: string) → {string}

converts the first character of the given string to uppercase

Parameters:
Name Type Description
str string

the string to be capitalized

Returns:
Type Description
string

the capitalized string

isBoolean string.js:33
isBoolean(str: string) → {boolean}

returns true if the given string contains a true or false

Parameters:
Name Type Description
str string

the string to be tested

Returns:
Type Description
boolean

true if the string is either true or false

isDataUrl string.js:62
isDataUrl(str: string) → {boolean}

returns true if the given string is a data url in the data:[<mediatype>][;base64],<data> format. (this will not test the validity of the Data or Base64 encoding)

Parameters:
Name Type Description
str string

the string (url) to be tested

Returns:
Type Description
boolean

true if the string is a data url

isNumeric string.js:18
isNumeric(str: string) → {boolean}

returns true if the given string contains a numeric integer or float value

Parameters:
Name Type Description
str string

the string to be tested

Returns:
Type Description
boolean

true if string contains only digits

toHex string.js:46
toHex(str: string) → {string}

convert a string to the corresponding hexadecimal value

Parameters:
Name Type Description
str string

the string to be converted

Returns:
Type Description
string

the converted hexadecimal value


Powered by webdoc!