Functions53 public, 1 private
Returns the numbers of bytes required for the provided string using the specified encoding. | |||
public | numeric | byteLen | |
required | string | value | |
string | encoding | UTF-8 | |
Appends/Prepends the specified character(s) to the provided string until the desired total length is reached. | |||
public | string | cJustify | |
required | string | string | |
If the final length is odd, the remaining character will be appended. | |||
required | string | length | |
If you specify multiple characters, it will be repeated like a single character. | |||
string | character | ||
Returns if the provided string contains an HTML tag or entity. Self-closing tags are only considered HTML if they are part of the spec. | |||
public | boolean | containsHtml | |
required | string | content | |
Returns the number of matches found for the specified string (needle) in the provided string (haystack). | |||
public | numeric | countMatches | |
required | any | haystack | |
required | string | needle | |
Counts the number of words found in the provided string. A word is separated by whitespaces or symbols. | |||
public | numeric | countWords | |
required | any | input | |
Creates a UUID with Base64url encoding. The "short" UUID consists of 22 characters and digits. | |||
public | string | createShortUUID | |
Converts the provided UUID (HEX encoded) to GUID (HEX encoded). | |||
public | string | createGUID | |
string | uuid | createUUID() | |
Creates a UUID with HEX encoding and removes the dashes. The UUID consists of 32 uppercase hexadecimal characters. | |||
public | string | createUUID | |
public | boolean | endsWith | |
required | any | string | |
required | any | value | |
public | boolean | endsWithNoCase | |
required | any | string | |
required | any | value | |
Corrects the length of the provided string considering the specified minimum/maximum length. | |||
public | string | fixLength | |
required | string | source | |
numeric | min | 0 | |
numeric | max | 0 | |
string | fill | _ | |
Corrects the length of the provided string padding the specified minimum length. | |||
public | string | fixMinLength | |
required | string | source | |
required | numeric | min | |
string | fill | _ | |
Corrects the length of the provided string truncating the specified maximum length. | |||
public | string | fixMaxLength | |
required | string | source | |
required | numeric | max | |
The ellipsis … is placed within the string and will not exceed the maximum. | |||
string | ellipsis | ||
Replaces occurences of placeholder marks in the provided string with the specified values in order. Default placeholder mark is: %s | |||
public | string | format | |
String that contains placeholder marks to be replaced. | |||
required | string | source | |
Collection of values to replace the placeholder marks in order. | |||
required | any | values | |
struct | OPTIONS | ||
option | string | placeholder | %s |
if there are more placeholders than values, keep the remaining placeholders | |||
option | boolean | keepRemainingPlaceholders | false |
how to repeat values in case there are more placeholder marks than values | |||
option | "ALL", "LAST", "NONE" | repeatArgs | NONE |
Generates a human friendly sequence of (47) random characters. | |||
public | string | generateClearString | |
Length of the generated sequence. | |||
required | numeric | length | |
Generates a human friendly sequence of (27) random characters. | |||
public | string | generateClearStringNoCase | |
Length of the generated sequence. | |||
required | numeric | length | |
Generates a sequence of random characters. | |||
public | string | generateRandomString | |
Length of the generated sequence. | |||
required | numeric | length | |
Possible characters to appear in the generated sequence. | |||
array | characterSet | ||
public | string | generateRandomWords | |
required | numeric | count | |
string | delimiter | - | |
Converts the provided HTML content to plain text. | |||
public | string | htmlToPlain | |
The HTML content to strip down to plain text. | |||
required | string | html | |
Allow transforming common elements to their plain representation. | |||
boolean | transform | true | |
Returns if the provided string is considered as literal for regular expression. | |||
public | string | isReLiteral | |
required | any | value | |
Calculates the phonetics for the provided word(s) based on the Cologne phonetics by Hans-Joachim Postel. | |||
public | string | koelnerPhonetik | |
Word(s) to calculate the phonetics for. | |||
required | any | value | |
Calculate words divided by spaces separately. | |||
boolean | separateWords | false | |
Appends the specified character(s) to the provided string until the desired total length is reached. | |||
public | string | lJustify | |
required | string | string | |
required | string | length | |
If you specify multiple characters, it will be repeated like a single character. | |||
string | character | ||
Removes all obsolete white spaces (tabs, newlines, spaces) in the provided string. Only keeps single spaces. | |||
public | string | minifyString | |
required | string | value | |
Normalizes all newlines to linefeed (10) in the provided string. | |||
public | string | normalizeNewLines | |
required | string | source | |
Normalizes the provided string by using title case and removing obsolete whitespaces. | |||
public | string | normalizeString | |
required | string | value | |
NONE, COMPANY, PERSON | type | NONE | |
Pads any digit sequence in the provided string to the specified length | |||
public | string | padDigits | |
required | string | value | |
required | numeric | padding | |
struct | OPTIONS | {} | |
option | "DIGIT", "NUMERIC" | sequenceMode | DIGIT |
Converts the provided plain text to HTML. | |||
public | string | plainToHtml | |
required | string | text | |
Visualizes whitespaces in the provided string by replacing non-printable characters into printable characters. | |||
public | string | printWhitespaces | |
String that contains the whitespaces to visualize. | |||
required | string | source | |
struct | wsMap | ||
Prepends the specified character(s) to the provided string until the desired total length is reached. | |||
public | string | rJustify | |
required | string | string | |
required | string | length | |
If you specify multiple characters, it will be repeated like a single character. | |||
string | character | ||
Escapes the provided string for usage within regular expressions. | |||
public | string | reEscape | |
required | string | value | |
Extends ColdFusion's reFindNoCase by accepted data types. | |||
public | numeric | reFindNoCase | |
required | any | expression | |
required | any | data | |
Returns the matching groups found in the provided string using the specified regular expression. POSIX: captures all groups (supports lookbehind) JORO: captures first match only (does not support lookbehind) | |||
public | array | reMatchGroup | |
required | string, Pattern | regex | |
required | string | value | |
"JORO", "POSIX" | engine | POSIX | |
Returns the matching groups found in the provided string using the specified regular expression. POSIX: captures all groups (supports lookbehind) JORO: captures first match only (does not support lookbehind) | |||
public | array | reMatchGroupNoCase | |
required | string | regex | |
required | string | value | |
"JORO", "POSIX" | engine | POSIX | |
Replaces the last occurence of the specified string(s) with the provided string. | |||
public | string | replaceLastOccurenceOf | |
required | string | target | |
required | string, string[] | search | |
required | string | replace | |
Replaces words (with boundaries left and right) with the provided list of words. | |||
public | string | replaceWords | |
required | string | replaceIn | |
required | array | wordsToReplace | |
required | array | wordsToReplaceWith | |
array | additionalBoundaries | [] | |
Invokes the provided callback for each regular expression match in the provided string. | |||
public | string | reReplaceWithCallback | |
required | string | value | |
required | string | regex | |
required | function | callback | |
boolean | returnGroups | false | |
Invokes the provided callback for each regular expression match in the provided string. | |||
public | string | reReplaceNoCaseWithCallback | |
required | string | value | |
required | string | regex | |
required | function | callback | |
boolean | returnGroups | false | |
Transforms the provided string to a regular expression. Flags will be ignored. | |||
public | string | reTransform | |
required | string | value | |
public | boolean | startsWith | |
required | any | string | |
required | any | value | |
public | boolean | startsWithNoCase | |
required | any | string | |
required | any | value | |
Returns if the provided string contains any string in the provided array. Matching is case-insensitive. | |||
public | boolean | stringContainsAny | |
required | string | value | |
required | array | elements | |
Converts the provided string to a CSS class friendly format. | |||
public | string | toCssFriendly | |
required | string, string[] | value | |
boolean | multiClass | true | |
Converts the provided string to a file name friendly format. | |||
public | string | toFileFriendly | |
required | string | value | |
string | spaceCharacter | _ | |
Converts the provided string to a folder name friendly format. | |||
public | string | toFolderFriendly | |
required | string | value | |
string | spaceCharacter | _ | |
Converts the provided string to an URL friendly format, typically used for SEO. | |||
public | string | toSeoFriendly | |
required | string | value | |
string | language | ||
struct | OPTIONS | {} | |
option | array | preserveCharacters | [] |
Replaces all conflict-laden characters. | |||
public | string | toSqlFriendly | |
required | string | value | |
public | string | toNameCase | |
required | string | value | |
required | "COMPANY", "PERSON" | type | |
Converts the first letter of each word to uppercase and the remaining letters to lowercase. | |||
public | string | toTitleCase | |
required | string | value | |
struct | OPTIONS | {} | |
option | numeric | lower | 0 |
option | numeric | upper | 0 |
Removes all empty lines within the provided string. | |||
public | string | trimEmptyLines | |
required | any | value | |
Removes leading, trailing, consecutive and protected whitespaces. | |||
public | string | trimExtended | |
String to remove whitespaces in. | |||
required | string | value | |
Removes all tabs and obsolete newlines within the provided string. | |||
public | string | trimIndentation | |
required | any | value | |
public | string | trimLeadingZeros | |
required | string | value | |
Compares each character of the provided strings and returns the remaining part of the first string that is not equal to the second string. | |||
public | string | trimToDifference | |
required | string | valueA | |
required | string | valueB | |
string | ellipsis |