How to get the length of a string in ColdFusion

Len() - get the length of a string

Len.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Len function example: how to get the length of a string</title>
</head>

<body>
<h2 style="color:HotPink">Len Function Example</h2>

<cfset TestString="ColdFusion is the best">
<cfoutput>
<b>
TestString: #TestString#
<br />
TestString[Length]: #Len(TestString)#
</b>
</cfoutput>
</body>
</html>





More ColdFusion examples