CFLib.org – Common Function Library Project

StrLib

Last updated May 11, 2016 / 396 Released UDF(s)
FormatSSN

Translates a 9 digit string into a social security number. | Requires: CF5

Indent

Indents all the lines of a string. | Requires: CF5

LSMonthAsString

Returns the localized version of a month. | Requires: CF5

LSDayOfWeekAsString

Returns the localized version of a day of the week. | Requires: CF5

IsIP

Returns TRUE if the string is a valid IP address. | Requires: CF5

ListReverse

Reverses a list. | Requires: CF5

CreateGUID

Returns a UUID in the Microsoft form. | Requires: CF5

DollarAsString

Returns a number converted into a string (i.e. 1 becomes "One Dollar"). | Requires: CF5

GetWords

Shortens a string without cutting words in half. | Requires: CF5

PadString

Pads a string with n characters. Padding is from the left. | Requires: CF5

ListInCommon

Returns elements in list1 that are found in list2. | Requires: CF5

ListValueRange

Returns a comma delimited list filled with the positive intergers from the specified range. | Requires: CF5

CharAt

Returns the character at a certain position in a string. | Requires: CF5

StripUrl

The function deletes non-needed characters (ie. http://) | Requires: CF5

SignedDollarFormat

Returns amount signed and dollar formatted. | Requires: CF5

StripLZero

Strips leading zero's from a string or number. | Requires: CF5

MidString

Midstring: Return the middle part of a string between a specified start substring and a specified end substring. | Requires: CF5

IsAlphanumeric

Checks if a string is alphanumeric | Requires: CF5

ListUnion

Combines two lists, automatically removing duplicate values and returning a sorted list. | Requires: CF5

IsPalindrome

Checks string to see if it is a pPalindrome. | Requires: CF5

TrueFalseFormat

Converts Boolean values to either True or False. | Requires: CF5

GetHTMLTitle

Parses an HTML page and returns the title. | Requires: CF5

ListPad

Applys padding to each element in a list. | Requires: CF5

ReplaceListNoCase

Replace all occurences of elements in list one with elements in list two. Case insensitive version of ReplaceList. | Requires: CF5

Jumble

Takes a string and scrambles the characters. | Requires: CF5

GetNumbers

Returns the passed string with all non-numbers removed (letters, punctuation, whitespace, etc.). | Requires: CF5

FormStripHTML

Strips HTML from all form fields. | Requires: CF5

AccessLinkClean

This turns a Microsoft Access hyperlink field into a standard URL. | Requires: CF5

StateToAbbr

Takes a full State name (i.e. California) and returns the two letter abbreviation (i.e. CA). | Requires: CF5

IsRUT

Returns True if the specified value and verifying digit constitute a valid RUT (government company number used in Chile). | Requires: CF5

RESplit

Splits a string into arrays based on a regex. | Requires: CF5

RomanFormat

Converts a number to Roman numerals. | Requires: CF5

RFind

Returns the last index of an occurrence of a substring in a string from a specified starting position. | Requires: CF5

RFindNoCase

Returns the last index (case insensitive) of an occurrence of a substring in a string from a specified starting position. | Requires: CF5

GetFileFromURL

Returns the file name from a specified URL. | Requires: CF5

GetPathFromURL

Returns the path from a specified URL. | Requires: CF5

GetPortFromURL

Returns the port number from a specified URL. | Requires: CF5

GetAnchorFromURL

Returns the page anchor from a specified URL. | Requires: CF5

GetPasswordFromURL

Returns the password from a specified URL. | Requires: CF5

GetSchemeFromURL

Returns the scheme from a specified URL. | Requires: CF5

GetSearchFromURL

Returns the search part from a specified URL. | Requires: CF5

Right2

Adds zero and negative support to the length parameter of right(). | Requires: CF5

Left2

Adds zero and negative support to the length parameter of left(). | Requires: CF5

QueryStringDeleteVar

Deletes a var from a query string. | Requires: CF5

MaxLength

Limit a string's output to the desired length. | Requires: CF5

isNumericList

Checks if a list consists of numeric values only. | Requires: CF5

FindOccurrences

Returns the number of times a pattern exists within a string. | Requires: CF5

IsABA

Checks that a number is a valid ABA routing number. | Requires: CF5

ListMid

A Mid() function for lists. Returns n elements starting at the specified start position. | Requires: CF5

WriteCalendar

Produces a Calendar for a given month and year. | Requires: CF5

FullLeft

An enhanced version of left() that doesn't cut words off in the middle. | Requires: CF5

SubmitButton

Create a simple submit button by providing name, value, class, width, and onClick. | Requires: CF5

ListLeft

A Left() function for lists. Returns the n leftmost elements from the specified list. | Requires: CF5

ListRight

A Right() function for lists. Returns the n rightmost elements from the specified list. | Requires: CF5

ListDeleteMid

Deletes n elements starting at the specified start position. | Requires: CF5

ListDeleteRight

Deletes the n rightmost elements from the specified list. | Requires: CF5

ListDeleteLeft

Deletes the n leftmost elements from the specified list. | Requires: CF5

ListDeleteRange

This function deletes a range of items from a list. | Requires: CF5

WAPSafe

Returns a WAP safe string. | Requires: CF5

EmailAntiSpam

When given an email address this function will return the address in a format safe from email harvesters. | Requires: CF5

MessageListDisplay

Takes an array or struct of basic values and returns and HTML-formatted string. | Requires: CF5

IsZip

Tests passed value to see if it is a properly formatted U.S. zip code. | Requires: CF5

HMSFormat

Formats a time difference in hours, minutes and seconds. | Requires: CF5

UCaseAll

Returns a string with all words capitalized with special non english characters. | Requires: CF5

CreatePIN

Flexible PIN generator, supporting alphabetical, numeric, and alphanumeric types, upper, lower, and mixed cases, and validating prescence of letters and numbers in alphanumeric PINs at least 2 characters long. | Requires: CF5

IsISBN

Checks to to see if value is a valid ISBN. | Requires: CF5

UPCCheckDigit

Calculates a UPC-A check digit. | Requires: CF5

PadStringToLen

Pads a string to a length of n characters. Padding is from the left. | Requires: CF5

ListSwap

Swaps two elements in a list. | Requires: CF5

IsAlphabet

This UDF confirms whether a string contains only letters. | Requires: CF5

StripBlock

Removes all characters in a string between two characters. | Requires: CF5

ListRemoveByString

Removes values from a list by string pattern. | Requires: CF5

ParagraphFormat2

An "enhanced" version of ParagraphFormat. | Requires: CF5

ListFormatted

Adds formatting to list elements, for displaying lists in a more readable fashion. | Requires: CF5

FormattedValueOrString

Returns either a formatted value or the passed default string. | Requires: CF5

ListLoop

Applies simple evaluations to every element in a list. | Requires: CF5

QueryToSelectOptions

Creates a list of select-field option tags from the provided query. | Requires: CF5

ReplaceAt

Replaces oldSubString with newSubString from a specified starting position. | Requires: CF5

ReplaceAtNoCase

Replaces oldSubString with newSubString from a specified starting position while ignoring case. | Requires: CF5

REEscape

Escapes all regular expression "special characters" in a string with "\". | Requires: CF5

REReplaceAt

Replaces a regular expression with newSubString from a specified starting position. | Requires: CF5

REReplaceAtNoCase

Replaces a regular expression with newSubString from a specified starting position while ignoring case. | Requires: CF5

ListDiff

Compares two lists and returns the elements that do not appear in both lists. Returns a list that contains the elementsrest between list1 and list2 | Requires: CF5

XMLSafe

Extends XMLFormat to include stripping non-printable characters. | Requires: CF5

GetGoogleKeywords

Pass it a http_referer value and this fuction will parse out the keywords used to find it if referred from Google. | Requires: CF5

ListSortByLen

Sorts a list by the length of its elements. | Requires: CF5

SubStr

Returns the substring of a string. It mimics the behaviour of the homonymous php function so it permits negative indexes too. | Requires: CF5

StripAllBut

Strips all characters from a string except the ones that you want to keep. | Requires: CF5

ListRandomElements

Returns specified number of random list elements without repeats. | Requires: CF5

AccessPatternMatchingFormat

Strip pattern-matching wildcards from a string appearing in an Access query. | Requires: CF5

VerticalText

Take a string, make it appear vertically. | Requires: CF5

SQLServerPatternMatchingFormat

Strip pattern-matching wildcards from a string appearing in a SQL Server query. | Requires: CF5

NumberAsString

Returns a number converted into a string (i.e. 1 becomes "One"). | Requires: CF5

GetUsernameFromURL

Returns the username from a specified URL. | Requires: CF5

GetHostFromURL

Returns the host from a specified URL. | Requires: CF5

CommaFormat

Adds commas after every third non-ending digit to the left of the decimal point. | Requires: CF5

BracketNumberFormat

Returns a negative number in brackets. | Requires: CF5

QueryStringChangeVar

Changes a var in a query string. | Requires: CF5

NumbersOnly

Strips all non-numeric characters from a string. | Requires: CF5

DollarFormat2

Works like the built-in function DollarFormat, but does no rounding. | Requires: CF5

GetTagContent

Returns the content enclosed in a tag pair. | Requires: CF5

HideLink

Disguise a link using JavaScript's window.status attribute. | Requires: CF5

SpaceCap

Returns a string with a space before each capital letter. | Requires: CF5

HighlightFromTo

Applies a simple highlight from and to a given position in a string. | Requires: CF5

ParsePOPSubject

Parses subjects returned by CFPOP. | Requires: CF5

GetContainer

Gets the next text container (placeholder, tag, etc.) from a string as designated by starting and ending identifiers. | Requires: CF5

IsMSSQLGUID

Returns true if the string is a MS SQL GUID. | Requires: CF5

OrderListByList

Reorders a list to the order of another, placing elements from the complete list not found in the second at the end of the reordered list. | Requires: CF5

ListNext

Given the current list item, returns the next item within a list of unique values. | Requires: CF5

Byline

Generates a byline from a list of names. | Requires: CF5

BRCurrencyFormat

Works like the built-in function lsCurrencyFormat, but do it right for Brazilian Currency (R$ - Real). | Requires: CF6

StripAnchors

A function that will strip out all anchors in text that has been passed as an argument. | Requires: CF5

XMLUnFormat

UN-escapes the five forbidden characters in XML data. | Requires: CF5

HtmlCompressFormat

Replaces a huge amount of unnecessary whitespace from your HTML code. | Requires: CF5

CssCompactFormat

Replaces all unnecessary characters from a section of CSS code. | Requires: CF5

StripAscii

Removes ASCII character codes from the string. | Requires: CF5

IntegerRankFormat

Turn 1 into 1st, 2 into 2nd, etc. | Requires: CF5

NumberUnFormat

Removes all non-essential formatting from a number. | Requires: CF5

ListMax

ListMax returns the greatest value in a list. | Requires: CF5

AsciiToDec

Convert ASCII characters into a decimal number. | Requires: CF5

CheckPattern

This UDF is an extensible, easy to use pattern validator using regular expressions. | Requires: CF5

FixMacPost

Remove extra characters from a form post added by Mac IE. | Requires: CF5

ListgetMultipleOf

Returns a list with a specified factor of list elements from the passed list . | Requires: CF5

ThisOrThat

Returns default value if primary value is empty. | Requires: CF5

jsFormat

Fixes an oversight in the jsstringformat() function | Requires: CF5

verityPercentage

Takes a verity "score" value and returns a formatted percentage. | Requires: CF5

ListContainsConsecutiveInt

Determines if a list consists of consecutive integers, regardless or order. | Requires: CF5

GetTabTextFeed

This UDF will take a Tab delimited text file and parse it into a mutlidimensional array | Requires: CF5

cfStringFormat

companion to jsstringformat - formats a string for use as a coldfusion literal value | Requires: CF5

padDirection

Basic padding function that allows user to decide which side of the submitted string that the characters should be added to (via L or R). | Requires: CF5

parseInt

Parse out the first set of numbers in a string. | Requires: CF5

SoundexDifference

Returns the difference between the SOUNDEX values of two strings | Requires: CF5

ListReFindNoCase

Searches a given list for a given regexp and returns the index number of the first item found. | Requires: CF5

CardinalToOrdinal

Convert cardinal number strings to ordinal number strings. | Requires: CF5

ListRemoveNulls

Removes null entries from lists. | Requires: CF5

ListCountSubstring

Counts the number of list elements that contain a given substring. | Requires: CF5

CountLines

This function returns the number of lines in a text file. | Requires: CF5

REGet

Returns all the matches of a regex from a string. | Requires: CF5

Highlight

Applies a simple highlight to a word in a string. | Requires: CF5

stringToArray

Turns a string to an array of 'count' character chunks. | Requires: CF5

listsAreDistinct

Tells whether two lists have entirely distinct elements | Requires: CF5

listAddAnd

Returns a list as an "English language" list. | Requires: CF5

FormatTeaser

Displays n number of characters from a string without cutting off in the middle of a word | Requires: CF5

wrap

Wraps a chunk of text at a given character count. | Requires: CF5

HTMLTrans

Converts the characters in a string to encoded special characters. | Requires: CF5

Is7bit

Determines whether a string is 7bit | Requires: CF5

FlashHtmlFormat

Converts a string into "Flash" safe HTML. | Requires: CF5

ListLenIncNulls

Length of list including empty elements. | Requires: CF5

ListGetAtIncNulls

Get specific list element of list where empty strings are counted as elements. | Requires: CF5

EmailDomainLink

Formats an e-mail address so that its domain is a link to its web site. | Requires: CF5

CountIt

Get a count on searching string in the searched string. | Requires: CF5

RandString

Returns a random string of the specified length of either alpha, numeric or mixed-alpha-numeric characters. | Requires: CF5

GetOrdinal

Returns the 2 character english text ordinal for numbers. | Requires: CF5

reFindNoCaseAll

Returns all the matches (case insensitive) of a regular expression within a string. This is simular to reGet(), but more closely matches the result set of reFind. | Requires: CF6

IsCFUUID

Returns TRUE if the string is a valid CF UUID. | Requires: CF5

httpDate

Format a date as required by HTTP specifications | Requires: CF6

splitUrl

Splits a URL into it's URL, QueryString, and Anchor parts. | Requires: CF5

xmlFormat2

Similar to xmlFormat() but replaces all characters not on the "good" list as opposed to characters specifically on the "bad" list. | Requires: CF5

ListNew

Creates a list from the passed arguments, skipping empty elements. | Requires: CF5

numTextListSort

This function is to be used, to sort a list that has numeric and text values. | Requires: CF6

hexToString

Converts a hex value to a string. | Requires: CF5

getISBN

Converts Barcode to valid ISBN number (without "-"). | Requires: CF5

getRandString

Returns a random alphanumeric string of a user-specified length. | Requires: CF5

differentChars

Counts how many different chars are in a string. | Requires: CF5

preg_match_all

Emulates the preg_match_all function in PHP for returning all regex matches along with their backreferences. | Requires: CF5

preg_match

Emulates the preg_match function in PHP for returning a regex match along with any backreferences. | Requires: CF5

pluralize

Very simple function to display either the plural or singular form for a numeric that is passed in. | Requires: CF5

OzFormatTelephone

Translates a 10 digit Australian telephone/facsimile number (either in STD or Toll Free format) into an Australian formatted telephone number. | Requires: CF5

ListGetRandom

Returns a random selection from a comma delimited list. | Requires: CF5

levDistance

Computes the Levenshtein distance between two strings. | Requires: CF5

ListHasDupes

Returns true if list has duplicate elements. | Requires: CF5

chrex

Charset attribute enabled extended chr function. | Requires: CF6

ListFix

Fixes a list by replacing null entries. | Requires: CF5

LanguageToCode

Takes a Language Name (i.e. English) and returns the ISO 669 Two-Letter Language Code (i.e. EN). | Requires: CF5

ActivateURL

This function takes URLs in a text string and turns them into links. | Requires: CF5

IsCreditCard

Returns TRUE if the string is a valid credit card number. | Requires: CF5

naughtyFilter

Replaces dirty words with pattern. | Requires: CF5

unicodeToJS

Replace html unicode strings with strings in javascript format. | Requires: CF5

jsToUnicode

Replace javascript unicode strings with unicode strings. | Requires: CF5

List2URLToken

Converts a list into a QueryString. Allows an "Exclude List" as well. | Requires: CF5

ListJuxt

Juxtaposes two lists together in an "every other value" method. | Requires: CF5

RePlaceHolders

Replaces variable placeholders with values of said variables. | Requires: CF5

Vars2Flash

Converts a list of variable names to a Flash safe string to pass into a Flash movie. | Requires: CF5

WordInstance

Returns the number of occurances of a word in a string. | Requires: CF5

ListElementPrepend

Prepends a string to every item in a list. | Requires: CF5

ListLongestItem

Returns the first occurrence of the longest item in a list. | Requires: CF5

StripTags

Strip xml-like tags from a string when they are within or not within a list of tags. | Requires: CF5

checkAsc

Only allow ASCII text string. | Requires: CF5

Soundex

Returns the Soundex of a string. | Requires: CF5

fixURLDecode

This is a workaround for the URLDecode bug that exists in CF5 and CFMX. | Requires: CF5

DecimalFormatCorrectly

Corrects rounding bug in DecimalFormat. | Requires: CF5

FilterMask

Applies a filter mask to a string. | Requires: CF5

REListFindNoCaseMultiple

When given a list of values, returns a list of element locations that match a given regular expression. | Requires: CF5

Split

Splits a string according to another string or multiple delimiters. | Requires: CF5

listFindMaxOccurance

This function will return the item with the most occurances in a list. | Requires: CF5

listGetDistinctValues

Returns a list of distinct values from a passed-in list. | Requires: CF5

QueryToCSV2

Convert the query into a CSV format using Java StringBuffer Class. | Requires: CF6

IsSSN

Checks passed value to see if it is a properly formatted U.S. social security number. | Requires: CF5

listRemoveList

Removes second list from first list, accepting an optional delimiter and whether to remove one or all list items. | Requires: CF5

paragraphtolist

Convert a text with many lines into a html list. | Requires: CF5

string2List

Converts a string to a list using the specified delimter (defaults to comma). Returns a list. | Requires: CF5

string2linesArray

Turn a string into an array of lines. | Requires: CF6

evaluateVariables

Replaces variable placeholders with values of said variables using any list of possible identifiers. | Requires: CF5

ParseURLData

An alternative way to retreive data from a URL. | Requires: CF5

IsZipCA

Tests passed value to see if it is a properly formatted Canadian zip code. | Requires: CF5

IsZipNL

Tests passed value to see if it is a properly formatted Dutch zip code. | Requires: CF5

listFindMissing

Find missing integers in a list of consequential numbers. | Requires: CF5

ozPhoneFormatPlus

Checks a phone number for Australian format. | Requires: CF5

listDeQualify

Used to remove qualifieers from a delimited list. | Requires: CF5

queryStringGetVar

Gets the value of a variable in a query string. | Requires: CF5

ListFindReplace

Finds a value in one list and returns the matching string at the same index in another list. | Requires: CF5

listFindOneOf

returns true if one of the values in the values list is found in the list. | Requires: CF6

codeToLanguage

Takes an ISO 669 Two-Letter Language Code (e.g., EN) and returns the Language (e.g., English). | Requires: CF5

removeLinks

Strips links and closing link tags from a string. | Requires: CF5

popularWords

Returns the most popular words in a query column and their count. | Requires: CF6

isTrueNumeric

Returns true if all characters in a string are numeric. | Requires: CF5

ListRemoveDuplicates

Remove duplicates from a list. | Requires: CF5

cyrillicDosToUnicode

Convert Cyrillic DOS coded text to Unicode text. | Requires: CF5

unicodeToCyrillicDos

Convert Unicode chars to Cyrillic DOS 8-bit char. | Requires: CF5

createRSSQuery

Converts an RSS 0.9+ feed into a structure. | Requires: CF6

detableize

Strips all table and table content tags and extra whitespace from a string. | Requires: CF6

TrimZero

Trim traling zeros from a numeric field. | Requires: CF6

richTextUnicodeFormat

Returns a rich text format unicode string, suitable for keyword replacement in rtf documents. | Requires: CF5

abbreviate

Abbreviates a given string to roughly the given length, stripping any tags, making sure the ending doesn't chop a word in two, and adding an ellipsis character at the end. | Requires: CF5

isPostalCodeBE

Checks if valid Belgium postal code. | Requires: CF5

isPostalCodeDK

Checks if valid postal code of Denmark. | Requires: CF5

isPostalCodeBR

Checks if postal code is format of Brazil. | Requires: CF5

isPostalCodeNL

Checks if valid Dutch postal code. | Requires: CF5

isUpperLower

Checks to see if a submitted letter is Upper or Lower Case. | Requires: CF5

nameCase

Converts an entire string to namecase (JARED RYPKA-HAUER becomes Jared Rypka-Hauer). | Requires: CF6

stripFont

This tag removes all font tags from a string. | Requires: CF5

listMin

ListMin returns the smallest value in a list. | Requires: CF5

listParseWithFunction

Parse a list of values with the specified function. | Requires: CF5

listFromDateRange

ListFromDateRange returns a list of dates given a starting and ending date. | Requires: CF5

listVenn

Performs venn type operations on two lists. | Requires: CF5

hrefsToList

Extracts all links from a given string and puts them into a list. | Requires: CF5

parseCMSRevision

Parses a CMS (SNV or CVS) revision string into a usable variable. | Requires: CF5

xmlHumanReadable

Formats an XML document for readability. | Requires: CF6

listCountListInList

Count the number of occurences of items from one list to another list. | Requires: CF5

magicQuote

Cleanly converts typewriter quotes to typographer's quotes. | Requires: CF5

listTrim

Returns the list which was passed in after having trimmed each list item. | Requires: CF5

stringToHex

Counterpart to HexToString - converts an ASCII string to hexadecimal. | Requires: CF5

isUpper

Checks to see if a string is all upper case characters | Requires: CF5

isLower

Checks to see if a string is all lower case characters | Requires: CF5

listDelete

Delete items from a list. | Requires: CF5

breadCrumb

Creates a bread crumb trail based on your sites sirectory structure. | Requires: CF5

splitList

Split list into two lists of about equal length. | Requires: CF5

HTMLSafe

Coverts special characters to character entities, making a string safe for display in HTML. | Requires: CF5

getOccurrenceCount

Count the occureneces of a value or list of values in a given string. | Requires: CF5

SafeText

Removes potentially nasty HTML text. | Requires: CF5

strXOR

Returns as a binary object the chr by chr XOR of two given strings for length of shortest of the two. | Requires: CF6

firstParagraph

Finds the first paragraph in a given string. | Requires: CF5

listRest2

Same functionality as CF stock listRest but faster, at least on CFMX 7.01 | Requires: CF5

quotedListToArray

Converts elements in a quoted list to an array. | Requires: CF7

queryColumnToList

Takes a selected column of data from a query and converts it into a list. | Requires: CF5

iso88591

Parses any string into iso-8859-1 codification. | Requires: CF6

parseQuotedPrintable

Converts a string of text from Quoted-Printable format to UTF-8. | Requires: CF6

parseUrl

Parses a Url and returns a struct with keys defining the information in the Uri. | Requires: CF7

listMaxDate

Checks a list of dates for the maximum date. | Requires: CF5

listMinDate

Checks a list of dates for the minimum date. | Requires: CF5

randStr

Returns a randomly generated string using the specified character sets and length(s) | Requires: CF5

GetMetaHeaders

Parses an HTML string and returns META tag information. | Requires: CF5

humanize

Takes a string and humanizes it, removing underscores and capitalizing each word. | Requires: CF5

REReplaceList

RE replace a list list of regular expression with a list of string. | Requires: CF5

detectLanguage

This function try to guess the language of a given text. | Requires: CF6

xmlFormatMid

Properly performs substring functionality on XML-Formatted strings. | Requires: CF5

listAppendAndReplace

Appends one list to another, with a maximum list length specified, and replaces any overlapping values. | Requires: CF5

stringFormat

Formats a string similarly to how NumberFormat formats a number. | Requires: CF5

urlBase64Encode

Encodes a string to base64 format, then urlEncodes the result so that it works when used as part of a URL string. | Requires: CF5

BitFormat

Format a value as 1 or 0. | Requires: CF5

formatTimespan

Returns a custom-formated timespan, similar to timeFormat(). | Requires: CF6

getNameInitials

Extracts the initials of a name from long string. | Requires: CF5

ListDiffDup

Compares two lists and returns the elements that are unique for each list. | Requires: CF5

gzip

Compresses a string using the gzip algorithm; returns binary or a string of (base64|hex|uu). | Requires: CF7

ungzip

Decompresses a binary or (base64|hex|uu) encoded string using the gzip algorithm; returns a string. | Requires: CF7

listCountUnique

Count unique items in a list. (Case-sensitive) | Requires: CF5

listCountUniqueNoCase

Count unique items in a list. (Case-insensitive) | Requires: CF5

removeHTML

Removes All HTML from a string removing tags, script blocks, style blocks, and replacing special character code. | Requires: CF5

trimHTML

Like Trim() except it also works on html. | Requires: CF5

trimAccessHyperlink

Convert an Access hyperlink field to text. | Requires: CF5

jsondecode

DeSerialize JSON data into ColdFusion native objects (simple value, array, structure, query) | Requires: CF6

jsonencode

Serialize native ColdFusion objects into a JSON formated string. | Requires: CF6

ListDeleteDuplicates

Case-sensitive function for removing duplicate entries in a list. | Requires: CF5

ListDeleteDuplicatesNoCase

Case-insensitive function for removing duplicate entries in a list. | Requires: CF5

XHTMLParagraphFormat

Returns a XHTML compliant string wrapped with properly formatted paragraph tags. | Requires: CF5

tagStripper

Function to strip HTML tags, with options to preserve certain tags. | Requires: CF5

delimitInterCap

Adds delimiting character(s) before capital letters in interCap strings. | Requires: CF5

findAll

Finds all occurrences of a substring in a string. | Requires: CF5

lastIndexOf

Returns the index position of the last matching character in a string. | Requires: CF6

IsListInList

Checks is all elements of a list X is found in a list Y. | Requires: CF5

findList

Finds within a given string the location of the first occurrence of any element in a list. | Requires: CF6

pwStrength

Checks the strength of a user supplied password. | Requires: CF5

ListReturnDuplicates

Searches a list for case- sensitive Duplicates and returns a list of the duplicate items or an empty string if no dupes are found. | Requires: CF5

ListReturnDuplicatesNoCase

Searches a list for case-INsensitive duplicates and returns a list of the duplicate items or an empty string if no dupes are found. | Requires: CF5

getTagContentAll

Extract all occurrences of a given tag pair from a string. | Requires: CF5

IsZIPUK

Tests passed value to see if it is a properly formatted U.K. postcode (zip code). | Requires: CF5

cfRssFeed

Display rss feed. | Requires: CF6

CompareIgnoreWhiteSpace

Performs a comparison of two strings ignoring any whitespace characters. | Requires: CF5

listCountItemSimilar

Determines number of list items that begin with the strToMatch. | Requires: CF5

listIsItemSimilar

Determines whether any list items begin with the strToMatch. | Requires: CF5

splitMX

splitMX converts a string or a list to an array using another string, or a multiple characters as a delimiter/ | Requires: CF6

varNameToText

Converts a camel-case or underscored var name to plain text. | Requires: CF5

cssToStruct

Convert CSS Rules to a ColdFusion struct. | Requires: CF6

recordsInView

Creates an easy reccord pagination indicator. | Requires: CF5

stripURLToken

Strips the cfid/cftoken information from a string. | Requires: CF5

unIndent

Un-indents strings but preserves formatting | Requires: CF5

showPagination

Creates easy pagination output ie: < 1|2|3|4|5 ... |101|102|103|104|105 > | Requires: CF5

verityClean

Creates a verity "safe" search string. | Requires: CF5

ccEscape

Escapes a credit card number, showing only the last 4 digits. The other digits are replaced with the * character. | Requires: CF5

isEmail

Tests passed value to see if it is a valid e-mail address (supports subdomain nesting and new top-level domains). | Requires: CF5

RandomizeString

I generate a randomized string of desired length. | Requires: CF5

ReMatchNoCase

Provides the CF8 ReMatchNoCase functionality in MX6/MX7 | Requires: CF6

ReMatch

Provides the CF8 ReMatch functionality in MX6/MX7 | Requires: CF5

IsColor

Checkes to see if a color is a valid 3 or 6 character hex color, or one of the ColdFusion safe color keywords. | Requires: CF8

getForegroundColor

Determines a light or dark text color based on the given background color. | Requires: CF5

LeftDotDot

leftDotDot turns "This is a nice day" into "This is a nic.." | Requires: CF5

midLimit

Limits a string from the center inserting "..." | Requires: CF5

GetSecureURL

Creates an HTTPS URL for the current page, or for given page information. | Requires: CF5

convertMemoryUnit

Converts a unit of memory to another unit of memory. | Requires: CF5

sluggify

Converts a string into a pretty URL safe slug | Requires: CF6

replaceLast

Replaces the last occurrence of a substring in a string | Requires: CF5

formToNameValuePairs

I generate concatenated name-value pairs from forms. | Requires: CF7

listCompare

Compares one list against another to find the elements in the first list that don't exist in the second list. | Requires: CF6

XmlSafeText

Replacement for XmlFormat that also replaces all special characters. | Requires: CF8

listWithNullsToArray

Return an array from a list with null values. | Requires: CF5

createMod10

Implementation of Luhn algorithm or Mod10. | Requires: CF5

isValidPhone

Simple Validation for Phone Number syntax. | Requires: CF5

ListRestRight

Same functionality as CF ListRest starting from right instead of left. | Requires:

formatListAsSeries

Function that formats a numeric list so that successive numbers are shown as a series. | Requires: CF5

romanToDecimal

Converts Roman numerals to decimal. | Requires: CF5

byteAutoConvert

Converts Byte values to the shortest human-readable format | Requires: CF5

CodeToCountry

Takes a two letter Country Code (i.e. US) and returns the full Country Name (i.e. UNITED STATES). | Requires: CF5

CountryTo3ACode

Takes a Country (i.e. United Kingdom) and returns the 3 letter ISO Country Name (i.e. GBR). | Requires: CF5

CountryToCode

Takes a Country (i.e. United United Kingdom) and returns theISO Country Name (i.e. GB). | Requires: CF5

removeEndSpaces

strips all graph characters (spaces, tabs, line breaks) off the end of a string. | Requires: CF5

ConvertCountryISOCodes

Convert between ISO country types: Name, Numeric, Alpha2 and Alpha3 | Requires: CF5

removeNullAndDangleDelimFromList

Remove null element and dangel delimiter from the list | Requires: CF5

camelToSpace

Breaks a camelCased string into separate words | Requires: CF6

ListSplit

A split function for lists, splitting the original list into lists of n array elements. | Requires: CF5

StringSplice

Python Style String Splicing | Requires: CF5

upperFirst

Upper cases the first letter of a string. | Requires: CF5

highlightAndCrop

Crops a string and highlights keywords. | Requires: CF6

JSCompressor

Compresses javascript code | Requires: CF6

justNumericList

Filters a list so that just numeric entries are returned. | Requires: CF5

capFirstList

Capitalize the first letter of each item in a list. | Requires: CF5

nodupslist

Remove duplicate values from a list. | Requires: CF6

getLeadingHtml

Display N leading characters of a text block which may include HTML. | Requires: CF5

isURL

A quick way to test if a string is a URL. | Requires: CF7

DeMoronize

Fixes text using Microsoft Latin-1 "Extentions", namely ASCII characters 128-160. | Requires: CF5

celticMcCaps

Proper capitalization for us Mc's and Mac's! | Requires: CF5

singleLine

Strips characters that cause line wrap when exporting. | Requires: CF5

stripOuterQuotes

Strips doublequotes from the beginning and end of a string. | Requires: CF5

convertSpecialChars

Reformats special chars typically found when copying and pasting from Word. | Requires: CF5

phoneFormat

Allows you to specify the mask you want added to your phone number. | Requires: CF5

getLinks

Finds all anchor or frame tags and creates a structure that you can use to look up a URL by name. | Requires: CF5

activateLinks

Converts text links into HTML links within a string | Requires: CF6

replaceStructNoCase

Returns string, with occurence of structure key names replaced by structure values. | Requires: CF6

reCompile

Create a java.util.regex.Pattern in a CF-friendly way. | Requires: CF9

getEmails

Searches a string for email addresses. | Requires: CF5

cleanPhone

Strips unnecessary characters from phone numbers and returns a consistent looking phone number and extension, if necessary. | Requires: CF5

toFriendlyURL

enhanced version of friendlyURL that also replaces diacritics with plausible ascii substitutes | Requires: CF8

CapFirstTitle

Returns a string with words capitalized for a title. | Requires: CF5

reFindAll

Finds all occurences of a regex in a string. | Requires: CF6

replaceSpecialChars

Replaces all special characters in a string of text. | Requires: CF6

dice

Divide a string in parts of equal size with separators in between/ | Requires: CF5

formatUKPostcode

Formats a string to become a valid UK postcode | Requires: CF5

createByteArray

Converts a ColdFusion string to a Java byte array | Requires: CF6

trimZeros

I trim leading and trailing zeros off of a decimal number. | Requires: CF5

convertPhoneLetters

Converts the letters in a phone number to the corresponding digits on an American phone. | Requires: CF9

toBoolean

I convert anything to boolean | Requires: CF9

cjustify2

Same as built-in CJustify(), but allows optional parameter character to pad with. | Requires: CF5

formatJSON

Formats a JSON string with indents & new lines. | Requires: CF9

ljustify2

Same as built-in LJUSTIFY, but allows optional parameter character to pad with. | Requires: CF5

stringFind

Returns matched substrings and subexpressions from a string based on a regular expression pattern | Requires: CF9

highlightKeywords

Highlights words in a string that are found in a keyword list. | Requires: CF9

balanceTags

Given unbalanced or truncated XHTML, returns balanced XHTML | Requires: CF6

twitterify

Converts hashtags, mentions, and embedded URLs to clickable links. | Requires: CF5

deAccent

Replaces accented characters with their non accented closest equivalents. | Requires: CF6

isVIN

US Vehicle Identification Number (VIN) validation. | Requires: CF8

listAnd

Returns a list of all elements that are both in list LST1 and in list LST2 | Requires: CF9

format

Uses the Java String format() method to format a string in CFML. | Requires: CF9

listReFilterNoCase

Filters a target list, given a list of regex filters. | Requires: CF9

ListWrap

Wraps a list every n elements. | Requires: CF5

SmallCaps

Formats a string to simulate the small-caps style without using the css font-variant attribute. | Requires: CF9

acronym

Pass in a set of words to only display its acronym. | Requires: CF5

CSVtoArray

Converts a CSV file to an array. | Requires: CF6

htmlDecode

Inverse of HTMLEditFormat, similar to URLDecode | Requires: CF5

htmlEntityToUTF8

Converts HTML encoded entities into utf8 characters. | Requires: CF8

scramail

Scramail takes a string as an argument and changes the characters in the email to their ascii equivelents to hide the email address from spam bots. | Requires: CF5

titleCaseList

Title cases all elements in a list. | Requires: CF9

convertBBCodeToHtml

BBCode in, HTML out | Requires: CF10

fullUrlEncode

Give the fully escaped URL encoding of a string. | Requires: CF5

loremIpsum

Generates loremipsum text. | Requires: CF10

CapFirst

Capitalizes the first letter in each word. | Requires: CF10

stripHTML

Removes HTML from the string. | Requires: CF5

nullPad

Needs short description. | Requires: CF10

Search CFLib.org


Latest Additions

Raymond Camden added
QueryDeleteRows
November 04, 2017

Leigh added
nullPad
May 11, 2016

Raymond Camden added
stripHTML
May 10, 2016

Kevin Cotton added
date2ExcelDate
May 05, 2016

Raymond Camden added
CapFirst
April 25, 2016

Created by Raymond Camden / Design by Justin Johnson