Determines the length of a string or binary object.
Number; length of a string or a binary object.
Len(string or binary object)
ColdFusion MX: Changed Unicode support: ColdFusion supports the Java UCS-2 representation of Unicode character values 0-65535. (ColdFusion 5 and earlier releases supported ASCII values 1-255. When calculating a length, some string-processing functions processed the ASCII 0 (NUL) character, but did not process subsequent characters of the string.)
Parameter |
Description |
|---|---|
string |
A string, the name of a string, or a binary object |
<cfscript>
myString="The quick brown fox jumped over the lazy dog.";
WriteOutput(Len(myString)); // Returns the length of the input string
</cfscript>
Output
45
Sign in to your account