Last updated on
Description
Determines the length of a string or binary object.
Returns
Number; length of a string or a binary object.
Category
Function syntax
Len(string or binary object)
See also
History
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.)
Parameters
Parameter |
Description |
---|---|
string |
A string, the name of a string, or a binary object |
Example
<cfscript> myString="The quick brown fox jumped over the lazy dog."; WriteOutput(Len(myString)); // Returns the length of the input string </cfscript>
Output
45