Strings (dw::core::Strings) Flashcards
appendIfMissing
Appends the suffix to the end of the text if the text does not already ends with the suffix.
camelize
Returns a string in camel case based on underscores in the string.
capitalize
Capitalizes the first letter of each word in a string.
charCode
Returns the Unicode for the first character in an input string.
charCodeAt
Returns the Unicode for a character at the specified index.
collapse
Collapses the string into substrings of equal characters.
countCharactersBy
Counts the number of times an expression that iterates through each character in a string returns true.
countMatches
Counts the number of matches in a string.
dasherize
Replaces spaces, underscores, and camel-casing in a string with dashes (hyphens).
everyCharacter
Checks whether a condition is valid for every character in a string.
first
Returns characters from the beginning of a string to the specified number of characters in the string, for example, the first two characters of a string.
fromCharCode
Returns a character that matches the specified Unicode.
hammingDistance
Returns the Hamming distance between two strings.
isAlpha
Checks if the text contains only Unicode digits. A decimal point is not a Unicode digit and returns false.
isAlphanumeric
Checks if the text contains only Unicode letters or digits.
isLowerCase
Checks if the text contains only lowercase characters.
isNumeric
Checks if the text contains only Unicode digits.
isUpperCase
Checks if the text contains only uppercase characters.