Name

Left

Synopsis

Left(string, count)

Returns the number of characters specified by count, beginning at the leftmost position of string. The following example returns the 13 leftmost characters of a string:

<CFSET MyString="(555)555-5555 x5555">
<CFSET BasePhoneNumber = Left(MyString, 13)>

<CFOUTPUT>
<B>String:</B> #MyString#<BR>
<B>Base Phone Number:</B> #BasePhoneNumber#
</CFOUTPUT>

Get Programming ColdFusion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.