Adds
Negative values are also allowed.
String to add.
Index where
string
Original string with
Assigns variables to tokens in a string.
Variable tokens to assign in the string.
string
String with
Gets the character(s) at a given index.
Indicies of the character(s) requested.
Loop around the string or stop at the end, default = true.
string
Character(s) at the specified indices.
Array<string>
Converts underscores and hyphens to camel case.
If [first] is true the first letter will also be capitalized, default = true
string
Camel case version of the string.
Capitalizes the first character in the string.
Default = false
string
String
Runs callback [fn] against each character in the string. Returns an array of characters.
Callback function for each character in the string.
Array<string>
string[] with each element containing one character in the string.
Runs callback [fn] against each character code in the string. Returns an array of character codes.
Callback function for each character code in the string.
Array<number>
number[] with each element containing one character code in the string.
Compacts all white space in the string to a single space and trims the ends.
string
String with all whitespace compated to a single space.
Converts underscores and camel casing to hypens.
string
String with underscores and camel casing changed to hypens.
Decodes the string from base64 encoding.
string
Decoded base64 string.
Runs callback [fn] against each occurence of [search].
Search item to look for in the string.
Callback function for each occurance of [search]. If [search] is not provided each character is matched.
Array<string>
string[] of each item matched in the string.
Array<string>
Array<string>
Encodes the string into base64 encoding.
string
Base64 encoded string.
Returns true if the string ends with
String or RegExp to find at the end of the string.
Ending position to search for, defaults to the end of the string.
True for case sensitive, default = true.
boolean
True if the string ends with
boolean
boolean
boolean
Converts HTML characters to their entity equivalents.
string
HTML escaped string.
Escapes all RegExp tokens in the string.
string
RegExp escaped string.
Escapes characters in a string to make a valid URL.
string
URL escaped string.
Returns the first [n] characters of the string.
string
String
Returns a section of the string starting from [index].
string
String
Converts full-width characters (zenkaku) to half-width (hankaku).
default = 'all'
string
Converted string to hankaku.
string
Returns true if the string matches
Search parameters.
boolean
True if the string matchs
boolean
Returns true if the string contains any characters in Arabic.
boolean
True if the string contains Arabic.
Returns true if the string contains any characters in Cyrillic.
boolean
True if the string contains Cyrillic.
Returns true if the string contains any characters in Devanagari.
boolean
True if the string contains Devanagari.
Returns true if the string contains any characters in Greek.
boolean
True if the string contains Greek.
Returns true if the string contains any characters in Han.
boolean
True if the string contains Han.
Returns true if the string contains any characters in Hangul.
boolean
True if the string contains Hangul.
Returns true if the string contains any characters in Hebrew.
boolean
True if the string contains Hebrew.
Returns true if the string contains any characters in Hiragana.
boolean
True if the string contains Hiragana.
Returns true if the string contains any characters in Kana.
boolean
True if the string contains Kana.
Returns true if the string contains any characters in Kanji.
boolean
True if the string contains Kanji.
Returns true if the string contains any characters in Katakana.
boolean
True if the string contains Katakana.
Returns true if the string contains any characters in Latin.
boolean
True if the string contains Latin.
Returns true if the string contains any characters in Thai.
boolean
True if the string contains Thai.
Converts katakana into hiragana.
If [all] is false, only full-width katakana will be converted, default = true.
string
Converted string to hiragana.
Creates a human readable string.
string
Pretty printed version of the string.
string
Returns true if the string contains only characters in Arabic. Whitespace is ignored.
boolean
True if the string containsly only characters in Arabic.
Returns true if the string has a length of 0 or contains only whitespace.
boolean
True if the string has a length of 0 or contains only whitespace.
Returns true if the string contains only characters in Cyrillic. Whitespace is ignored.
boolean
True if the string containsly only characters in Cyrillic.
Returns true if the string contains only characters in Devanagari. Whitespace is ignored.
boolean
True if the string containsly only characters in Devanagari.
Returns true if the string contains only characters in Greek. Whitespace is ignored.
boolean
True if the string containsly only characters in Greek.
Returns true if the string contains only characters in Han. Whitespace is ignored.
boolean
True if the string containsly only characters in Han.
Returns true if the string contains only characters in Hangul. Whitespace is ignored.
boolean
True if the string containsly only characters in Hangul.
Returns true if the string contains only characters in Hebrew. Whitespace is ignored.
boolean
True if the string containsly only characters in Hebrew.
Returns true if the string contains only characters in Hiragana. Whitespace is ignored.
boolean
True if the string containsly only characters in Hiragana.
Returns true if the string contains only characters in Kana. Whitespace is ignored.
boolean
True if the string containsly only characters in Kana.
Returns true if the string contains only characters in Kanji. Whitespace is ignored.
boolean
True if the string containsly only characters in Kanji.
Returns true if the string contains only characters in Katakana. Whitespace is ignored.
boolean
True if the string containsly only characters in Katakana.
Returns true if the string contains only characters in Latin. Whitespace is ignored.
boolean
True if the string containsly only characters in Latin.
Returns true if the string contains only characters in Thai. Whitespace is ignored.
boolean
True if the string containsly only characters in Thai.
Converts hiragana into katakana.
string
Converted string to katakana.
Returns the last [n] characters of the string.
string
The last [n] characters of the string.
Runs callback [fn] against each line in the string.
Callback against each line in the original string.
Array<string>
A string[] where each element is a line in the original string.
Returns the string with accented and non-standard Latin-based characters converted into ASCII approximate equivalents.
string
String
Pads either/both sides of the string.
The padding characters to add to the string.
The number of
string
String
string
string
Runs callback [fn] against each paragraph in the string.
Callback function called for each paragraph in the string.
Array<string>
Returns a string[] where each element is a paragraph in the original string.
Replaces special characters in a string so that it may be used as part of a pretty URL.
string
URL parameterizes the string.
Returns the plural form of the word in the string.
string
String
Removes any part of the string that matches
Remove this from the string.
string
String with all instances of
string
Removes all HTML tags and their contents from the string
Remove these HTML tags.
string
String with HTML tags removed.
Returns the string repeated [num] times.
Number of times to repeat the string, default = 0.
string
Repeated [num] string.
Reverses the string.
string
Reversed string.
Shifts each character in the string
Number of characters to shift in the character map.
Array<string>
String with characters shifted
The reverse of String#pluralize.
string
Returns the singular form of a word in a string.
Converts camel case, underscores, and hyphens to a properly spaced string.
string
String
Returns true if the string starts with
String or RegExp to look for at the beginning of the string.
Starting position to start searching, default = 0.
True for case sensitive, default = true.
boolean
True if the string starts with find
.
boolean
boolean
boolean
Strips all HTML tags from the string.
HTML tags to strip from the string.
string
Returns the string with all HTML removed.
Creates a title version of the string.
string
Returns a titlized version of the string.
Returns a section of the string ending at [index].
Ending position in the substring, default = string.length.
string
Substring ending at [index].
Converts the string into a number in base [base].
The base to parse the number in, default = 10.
number
Parsed number.
Removes leading whitespace from the string.
string
Returns a string with leading whitespace removed.
Removes trailing whitespace from the string.
string
Returns a string with trailing whitespace removed.
Truncates a string.
The length to keep in the string before truncating.
True to split words, false keeps them intact but may truncate earlier.
Where to truncate the string from, default = 'right'.
Character to use as ellipsis.
string
Truncated string.
Converts hyphens and camel casing to underscores.
string
Returns a converted string.
Restores escaped HTML characters.
string
Returns unescaped HTML string.
Restores escaped characters in a URL escaped string.
If true only escape non-valid URL characters, default = false.
string
String
Runs callback [fn] against each word in the string.
Callback to run against each word in the string.
Array<string>
Returns an string[] with each element containing a word.
Converts half-width characters (hankaku) to full-width (zenkaku).
Types of characters to convert, default = 'all'.
string
String