Namespace: str

FooTable.str

This namespace contains commonly used string utility methods.

Methods

(static) contains(str, contains, ignoreCaseopt) → {boolean}

Checks if the supplied string contains the given substring.
Parameters:
Name Type Attributes Description
str string The string to check.
contains string The string to check for.
ignoreCase boolean <optional>
Whether or not to ignore casing when performing the check.
Returns:
Type
boolean

(static) containsWord(str, word, ignoreCaseopt) → {boolean}

Checks if the supplied string contains the given word.
Parameters:
Name Type Attributes Description
str string The string to check.
word string The word to check for.
ignoreCase boolean <optional>
Whether or not to ignore casing when performing the check.
Returns:
Type
boolean

(static) from(str, from) → {string}

Returns the remainder of a string split on the first index of the given substring.
Parameters:
Name Type Description
str string The string to split.
from string The substring to split on.
Returns:
Type
string

(static) random(prefixopt) → {string}

Generates a random string 9 characters long using the optional prefix if supplied.
Parameters:
Name Type Attributes Description
prefix string <optional>
The prefix to append to the 9 random characters.
Returns:
Type
string

(static) startsWith(str, prefix) → {boolean}

Checks if a string starts with the supplied prefix.
Parameters:
Name Type Description
str string The string to check.
prefix string The prefix to check for.
Returns:
Type
boolean

(static) toCamelCase(str) → {string}

Takes the supplied string and converts it to camel case.
Parameters:
Name Type Description
str string The string to camel case.
Returns:
Type
string