Description

Determines the length of a string or binary object.

Returns

Number; length of a string or a binary object.

Category

String functions

Function syntax

Len(string or binary object)

See also

ToBinaryLeftRightMid

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

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy