Trim() - remove leading and trailing spaces from a string
Trim.cfm
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Trim function example: how to remove leading and trailing spaces from a string</title>
</head>
<body>
<h2 style="color:HotPink">Trim Function Example</h2>
<cfset TestString=" Test string for Trim function ">
<cfoutput>
<b>
TestString: [#TestString#]
<br />
TestString(after trim): [#Trim(TestString)#]
</b>
</cfoutput>
</body>
</html>
- Asc() - get the value of a character
- Compare() - compare two strings (case sensitive)
- CompareNoCase() - compare two strings (case insensitive)
- Find() - find the first occurence of a substring in a string (case sensitive)
- FindNoCase() - find the first occurence of a substring in a string (case insensitive)
- ReplaceNoCase() - replace a substring in a string (case insensitive)
- Reverse() - reverse chracters in a string or digits in a number
- Right() - get the rightmost count characters in a string
- RTrim() - remove spaces from the end of a string
- UCase() - convert a string to uppercase