Strings

Methods

  • array.toList() Transform the array to a list of elements delimiter by the given string
  • datetime.dateFormat() Formats a date string to a given output
  • datetime.dateTimeFormat() Formats a date/time string to a given output
  • datetime.lSDateFormat() Formats a date string to a given output using the current sessions locale
  • datetime.lSDateTimeFormat() Formats a date string to a given output using the current locale
  • datetime.lSTimeFormat() Formats a time string to a given output using the current locale.
  • datetime.timeFormat() Formats a time string to a given output
  • string.asc() Determines the value of a character.
  • string.cJustify() Returns the given string justified to the center, padding out the words with spaces accordingly
  • string.compare() Performs a case-sensitive comparison of two strings. -1, if string1 is less than string2 0, if string1 is equal to string2 1, if string1 is greater than string2
  • string.compareNoCase() Performs a case-insensitive comparison of two strings. An indicator of the difference: A negative number, if string1 is less than string2 0, if string1 is equal to string2 A positive number, if string1 is greater than string2
  • string.decodeForHTML() Decodes the given encoded string.
  • string.decodeFromURL() Decodes a string that has been encoded in the URL using the encodeForURL. this function is deprecated, use function ESAPIDecode('url',...) instead.
  • string.encodeForCSS() Encodes the given string for safe output in CSS to stop Cross Site Scripting attacks.
  • string.encodeForDN() Encodes the given string for safe output in LDAP Distinguished Names.
  • string.encodeForHTML() Encodes the given string for safe output in HTML to stop Cross Site Scripting attacks.
  • string.encodeForHTMLAttribute() Encodes the given string for safe output in HTML to stop Cross Site Scripting attacks.
  • string.encodeForJavascript() Encodes the given string for safe output in JavaScript to stop Cross Site Scripting attacks.
  • string.encodeForLDAP() Encodes the given string for safe output in LDAP queries.
  • string.encodeForURL() Encodes the given string for safe output in a URL.
  • string.encodeForXML() Encodes the given string for safe output in XML to stop Cross Site Scripting attacks.
  • string.encodeForXMLAttribute() Encodes the given string for safe output in XMLAttribute to stop Cross Site Scripting attacks.
  • string.encodeForXPath() Encodes the given string for safe use in an XPath Query.
  • string.encrypt() Encrypts a string. Uses a symmetric key-based algorithm, in which the same key is used to encrypt and decrypt a string. The security of the encrypted string depends on maintaining the secrecy of the key. Uses an XOR-based algorithm that uses a pseudo-random 32-bit key, based on a seed passed by the user as a function parameter
  • string.find() Finds the first occurrence of a substring in a string, from a specified start position. The search is case-sensitive.
  • string.findNoCase() Finds the first occurrence of a substring in a string, from a specified start position. If substring is not in string, returns zero. The search is case-insensitive.
  • string.findOneOf() Finds the first occurrence of any one of a set of characters in a string, from a specified start position. The search is case-sensitive.
  • string.getToken() Determines whether a token of the list in the delimiters parameter is present in a string. Returns the token found at position index of the string, as a string. If index is greater than the number of tokens in the string, returns an empty string.
  • string.insert() Inserts a substring in a string after a specified character position. If position = 0, prefixes the substring to the string.
  • string.lCase() Converts the alphabetic characters in a string to lowercase.
  • string.left() Returns a substring from beginning of the input string, with a length specified by the count argument.
  • string.len() returns the len of a string
  • string.listAppend() Concatenates a list or element to a list.
  • string.listAvg()
  • string.listChangeDelims() Changes a list delimiter. Returns a copy of the list, with each delimiter character replaced by new_delimiter.
  • string.listCompact() remove empty items at the and and at the start of the list
  • string.listContains() Determines the index of the first list element that contains a specified substring. Returns the index of the first list element that contains substring. If not found, returns zero.
  • string.listContainsNoCase() Determines the index of the first list element that contains a specified substring.
  • string.listDeleteAt() Deletes an element from a list. Returns a copy of the list, without the specified element.
  • string.listEach() call the given UDF/Closure with every value in the string list.
  • string.listEvery() This function calls a given closure/function with every element in a given string list and returns true, if all of the closure calls returns true.
  • string.listFilter() This function creates a new string list that returns all entries from an string list that match the given filter.
  • string.listFind() Determines the index of the first list element in which a specified value occurs. Case-sensitive
  • string.listFindNoCase() Determines the index of the first list element in which a specified value occurs
  • string.listFirst() Gets the first element of a list.
  • string.listGetAt() Gets a list element at a specified position.
  • string.listIndexExists() Determines if an element at the given position exists or not
  • string.listInsertAt() Inserts an element in a list.
  • string.listItemTrim() Removes all the white space surrounding each element, returning back the new list
  • string.listLast() Gets the last element of a list.
  • string.ListLen() Determines the number of elements in a list.
  • string.listMap() Calls the given closure with every element in the given array. the function returns a array that contains all values returned by the closure.
  • string.listPrepend() Inserts an element at the beginning of a list.
  • string.listQualify() Inserts a string at the beginning and end of list elements.
  • string.listReduce() Iterates over every entry of the given array and calls the closure with every element. This function will reduce the array to a single value and will return the value.
  • string.listRemoveDuplicates() Removes duplicate values from list.
  • string.listRest() Gets a list, without its first element.
  • string.listSetAt() Replaces the contents of a list element.
  • string.listSome() This function calls a given closure/function with every element in a given string list and returns true, if one of the closure calls returns true.
  • string.listSort() Sorts list elements according to a sort type and sort order.
  • string.listToArray() Copies the elements of a list to an array.
  • string.listValueCount() Counts instances of a specified value in a list. The search is case-sensitive.
  • string.listValueCountNoCase() Counts instances of a specified value in a list. The search is case-insensitive.
  • string.lJustify() Left justifies characters in a string of a specified length.
  • string.ltrim() Removes leading spaces from a string.
  • string.mid() Extracts a substring from a string.
  • string.paragraphFormat() Formats the carriage returns in a string to a HTML alternatives
  • string.parseDateTime() Parses a date/time string according to the English (U.S.) locale conventions.
  • string.reFind() Uses a regular expression (RE) to search a string for a pattern. The search is case sensitive.
  • string.reFindNoCase() Uses a regular expression (RE) to search a string for a pattern, starting from a specified position. The search is case-insensitive.
  • string.REMatch() Uses a regular expression (RE) to search a string for a pattern, starting from a specified position.
  • string.REMatchNoCase() Uses a regular expression (RE) to search a string for a pattern, starting from a specified position.
  • string.removeChars() Removes characters from a string.
  • string.repeatString() Creates a string that contains a specified number of repetitions of the specified string.
  • string.replace() Replaces occurrences of substring1 in a string with substring2, in a specified scope. The search is case-sensitive.
  • string.replaceList() Replaces occurrences of the elements from a delimited list in a string with corresponding elements from another delimited list. The search is case-sensitive.
  • string.replaceListNoCase() Replaces occurrences of the elements from a delimited list in a string with corresponding elements from another delimited list. The search is NOT case-sensitive.
  • string.replaceNoCase() Replaces occurrences of substring1 with substring2, in the specified scope. The search is case-insensitive.
  • string.rEReplace() Uses a regular expression (RE) to search a string for a string pattern and replace it with another. The search is case-sensitive.
  • string.rEReplaceNoCase() Uses a regular expression to search a string for a string pattern and replace it with another. The search is case-insensitive.
  • string.reverse() Reverses the order of items, such as the characters in a string, the digits in a number, or the elements in an array.
  • string.right() Returns a substring from end of the input string, with a length specified by the count argument.
  • string.rJustify() Right justifies characters of a string.
  • string.rtrim() Removes spaces from the end of a string.
  • string.spanExcluding() Gets characters from a string, from the beginning to a character that is in a specified set of characters. The search is case-sensitive.
  • string.spanIncluding() Gets characters from a string, from the beginning to a character that is not in a specified set of characters. The search is case-sensitive.
  • string.stripCr() Deletes return characters from a string.
  • string.trim() Removes leading and trailing spaces from a string.
  • string.uCase() Converts the alphabetic characters in a string to uppercase.
  • string.ucFirst() Capitalizes the first character of the given string.
  • string.uRLDecode() Decodes a URL-encoded string.
  • string.URLEncode() Encodes a string to be URL-safe according to the application/x-www-form-urlencoded MIME format
  • string.uRLEncodedFormat() Generates a URL-encoded string. For example, it replaces spaces with %20, and non-alphanumeric characters with equivalent hexadecimal escape sequences. Passes arbitrary strings within a URL.
  • string.wrap() Wraps text so that each line has a specified maximum number of characters.
  • xml.transform() Applies an Extensible Stylesheet Language Transformation (XSLT) to an XML document object that is represented as a string variable. An XSLT converts an XML document to another format or representation by applying an Extensible Stylesheet Language (XSL) stylesheet to it.

Objects

Functions

  • ArrayToList Transform the array to a list of elements delimiter by the given string
  • Asc Determines the value of a character.
  • CJustify Returns the given string justified to the center, padding out the words with spaces accordingly
  • Compare Performs a case-sensitive comparison of two strings. -1, if string1 is less than string2 0, if string1 is equal to string2 1, if string1 is greater than string2
  • CompareNoCase Performs a case-insensitive comparison of two strings. An indicator of the difference: A negative number, if string1 is less than string2 0, if string1 is equal to string2 A positive number, if string1 is greater than string2
  • DateFormat Formats a date string to a given output
  • DateTimeFormat Formats a date/time string to a given output
  • DecimalFormat Converts a number to a decimal-formatted string.
  • DeserializeJSON Converts a JSON (JavaScript Object Notation) string data representation into CFML data, such as a struct or array.
  • DollarFormat Formats a string in U.S. format. (For other currencies, use LSCurrencyFormat)
  • Find Finds the first occurrence of a substring in a string, from a specified start position. The search is case-sensitive.
  • FindNoCase Finds the first occurrence of a substring in a string, from a specified start position. If substring is not in string, returns zero. The search is case-insensitive.
  • FindOneOf Finds the first occurrence of any one of a set of characters in a string, from a specified start position. The search is case-sensitive.
  • GetToken Determines whether a token of the list in the delimiters parameter is present in a string. Returns the token found at position index of the string, as a string. If index is greater than the number of tokens in the string, returns an empty string.
  • HTMLCodeFormat Replaces special characters in a string with their HTML-escaped equivalents and inserts and tags at the beginning and end of the string. [version] HTML version to use. currently ignored. -1: The latest implementation of HTML 2.0: HTML 2.0 (Default) 3.2: HTML 3.2
  • HTMLEditFormat Replaces special characters in a string with their HTML-escaped equivalents. [version] HTML version to use. currently ignored. -1: The latest implementation of HTML 2.0: HTML 2.0 (Default) 3.2: HTML 3.2 4.0: HTML 4.0
  • Insert Inserts a substring in a string after a specified character position. If position = 0, prefixes the substring to the string.
  • IsValid Tests whether a value meets a validation or data type rule.
  • JSStringFormat Escapes special JavaScript characters, such as single quotation mark, double quotation mark, and newline
  • LCase Converts the alphabetic characters in a string to lowercase.
  • Left Returns a substring from beginning of the input string, with a length specified by the count argument.
  • ListAppend Concatenates a list or element to a list.
  • ListAvg
  • ListChangeDelims Changes a list delimiter. Returns a copy of the list, with each delimiter character replaced by new_delimiter.
  • ListCompact remove empty items at the and and at the start of the list
  • ListContains Determines the index of the first list element that contains a specified substring. Returns the index of the first list element that contains substring. If not found, returns zero.
  • ListContainsNoCase Determines the index of the first list element that contains a specified substring.
  • ListDeleteAt Deletes an element from a list. Returns a copy of the list, without the specified element.
  • ListEach call the given UDF/Closure with every value in the string list.
  • ListEvery This function calls a given closure/function with every element in a given string list and returns true, if all of the closure calls returns true.
  • ListFilter This function creates a new string list that returns all entries from an string list that match the given filter.
  • ListFind Determines the index of the first list element in which a specified value occurs. Case-sensitive
  • ListFindNoCase Determines the index of the first list element in which a specified value occurs
  • ListFirst Gets the first element of a list.
  • ListGetAt Gets a list element at a specified position.
  • ListIndexExists Determines if an element at the given position exists or not
  • ListInsertAt Inserts an element in a list.
  • ListItemTrim Removes all the white space surrounding each element, returning back the new list
  • ListLast Gets the last element of a list.
  • ListLen Determines the number of elements in a list.
  • ListMap Calls the given closure with every element in the given array. the function returns a array that contains all values returned by the closure.
  • ListPrepend Inserts an element at the beginning of a list.
  • ListQualify Inserts a string at the beginning and end of list elements.
  • ListRemoveDuplicates Removes duplicate values from list.
  • ListRest Gets a list, without its first element.
  • ListSetAt Replaces the contents of a list element.
  • ListSort Sorts list elements according to a sort type and sort order.
  • ListToArray Copies the elements of a list to an array.
  • ListTrim this function is deprecated, use instead ListCompact
  • ListValueCount Counts instances of a specified value in a list. The search is case-sensitive.
  • ListValueCountNoCase Counts instances of a specified value in a list. The search is case-insensitive.
  • LJustify Left justifies characters in a string of a specified length.
  • LSCurrencyFormat Formats a number in a locale-specific currency format.
  • LSDateFormat Formats a date string to a given output using the current sessions locale
  • LSDateTimeFormat Formats a date string to a given output using the current locale
  • LSEuroCurrencyFormat this funciton is just a alias for lsCurrencyFormat
  • LSIsCurrency Determines whether a string is a valid representation of a currency amount in the current locale.
  • LSNumberFormat Formats a number to the given format mask in the current locale
  • LSParseCurrency Converts a locale-specific currency string into a formatted number. Attempts conversion by comparing the string with each the three supported currency formats (none, local, international) and using the first that matches.
  • LSParseEuroCurrency use function lsParseCurrency instead
  • LSParseNumber Converts a string that is a valid numeric representation in the current locale into a formatted number.
  • LSTimeFormat Formats a time string to a given output using the current locale.
  • LTrim Removes leading spaces from a string.
  • Metaphone Metaphone is a phonetic algorithm, an algorithm published in 1990 for indexing words by their English pronunciation. The algorithm produces variable length keys as its output, as opposed to Soundex's fixed-length keys. Similar sounding words share the same keys.
  • Mid Extracts a substring from a string.
  • NumberFormat Creates a custom-formatted number value
  • ParagraphFormat Formats the carriage returns in a string to a HTML alternatives
  • ParseDateTime Parses a date/time string according to the English (U.S.) locale conventions.
  • REFind Uses a regular expression (RE) to search a string for a pattern. The search is case sensitive.
  • REFindNoCase Uses a regular expression (RE) to search a string for a pattern, starting from a specified position. The search is case-insensitive.
  • REMatch Uses a regular expression (RE) to search a string for a pattern, starting from a specified position.
  • REMatchNoCase Uses a regular expression (RE) to search a string for a pattern, starting from a specified position.
  • RemoveChars Removes characters from a string.
  • RepeatString Creates a string that contains a specified number of repetitions of the specified string.
  • Replace Replaces occurrences of substring1 in a string with substring2, in a specified scope. The search is case-sensitive.
  • ReplaceListNoCase Replaces occurrences of the elements from a delimited list in a string with corresponding elements from another delimited list. The search is NOT case-sensitive.
  • ReplaceNoCase Replaces occurrences of substring1 with substring2, in the specified scope. The search is case-insensitive.
  • REReplace Uses a regular expression (RE) to search a string for a string pattern and replace it with another. The search is case-sensitive.
  • REReplaceNoCase Uses a regular expression to search a string for a string pattern and replace it with another. The search is case-insensitive.
  • Reverse Reverses the order of items, such as the characters in a string, the digits in a number, or the elements in an array.
  • Right Returns a substring from end of the input string, with a length specified by the count argument.
  • RJustify Right justifies characters of a string.
  • RTrim Removes spaces from the end of a string.
  • SerializeJSON Converts CFML data into a JSON (JavaScript Object Notation) representation of the data.
  • Soundex Soundex is a phonetic algorithm for indexing names by sound, as pronounced in English. The goal is for homophones to be encoded to the same representation so that they can be matched despite minor differences in spelling. The algorithm mainly encodes consonants; a vowel will not be encoded unless it is the first letter. Soundex is the most widely known of all phonetic algorithms, as it is a standard feature of MS SQL and Oracle, and is often used (incorrectly) as a synonym for "phonetic algorithm"
  • SpanExcluding Gets characters from a string, from the beginning to a character that is in a specified set of characters. The search is case-sensitive.
  • SpanIncluding Gets characters from a string, from the beginning to a character that is not in a specified set of characters. The search is case-sensitive.
  • Stringlen returns the len of a string
  • StripCr Deletes return characters from a string.
  • TimeFormat Formats a time string to a given output
  • ToScript Creates a JavaScript expression that assigns the value of a variable to a JavaScript variable. This function can convert strings, numbers, arrays, structures, and queries to JavaScript syntax that defines equivalent variables and values.
  • Trim Removes leading and trailing spaces from a string.
  • UCase Converts the alphabetic characters in a string to uppercase.
  • UcFirst Capitalizes the first character of the given string.
  • URLEncodedFormat Generates a URL-encoded string. For example, it replaces spaces with %20, and non-alphanumeric characters with equivalent hexadecimal escape sequences. Passes arbitrary strings within a URL.
  • URLSessionFormat Encodes the URL with the CFTOKEN/CFID/JSESSIONID
  • Wrap Wraps text so that each line has a specified maximum number of characters.
  • XMLFormat Escapes special XML characters in a string, so that the string is safe to use with XML.
  • XmlTransform Applies an Extensible Stylesheet Language Transformation (XSLT) to an XML document object that is represented as a string variable. An XSLT converts an XML document to another format or representation by applying an Extensible Stylesheet Language (XSL) stylesheet to it.