How to get the leftmost count characters in a string in ColdFusion

Left() - get the leftmost count characters in a string

Left.cfm


<!DOCTYPE html>

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

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

<cfset TestString="This is a test string">
<cfoutput>
<b>
TestString: #TestString#
<br />
TestString[Left 5 characters]: #Left(TestString,5)#
</b>
</cfoutput>
</body>
</html>





More ColdFusion examples