[Method] Capitalize the given string
String
string
String
[Method] Truncate a string and add an ellipsis to the end if it exceeds the specified length
String The string to truncate.
Number The maximum length to allow before truncating.
Boolean true to try to find a common word break.
string
String The converted text.
[Method] Escapes the passed string for and
String The string to escape.
string
String The escaped string.
[Method] Escapes the passed string for use in a regular expression
String
string
String
[Method] Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens
String The tokenized string to be formatted.
String... First param value to replace token {0}, then next param to replace {1} etc.
string
String The formatted string.
[Method] Convert certain characters amp lt and from their HTML character equivalents
String The string to decode.
string
String The decoded text.
[Method] Convert certain characters amp lt and to their HTML character equivalents for literal display in web pages
String The string to encode.
string
String The encoded text.
[Method] Pads the left side of a string with a specified character
String The original string.
Number The total length of the output string.
String The character with which to pad the original string (defaults to empty string " ").
string
String The padded string.
[Method] Returns a string with a specified number of repetitions a given string pattern
String The pattern to repeat.
Number The number of times to repeat the pattern (may be 0).
String An option string to separate each pattern.
[Method] Utility function that allows you to easily switch a string between two alternating values
String The current string.
String The value to compare to the current string.
String The new value to use if the string already equals the first value passed in.
string
String The new value.
[Method] Trims whitespace from either end of a string leaving spaces within the string intact
String The string to escape
string
String The trimmed string
[Method] Appends content to the query string of a URL handling logic for whether to place a question mark or ampersand
String The URL to append to.
String The content to append to the URL.
string
String The resulting URL.