Whatever message this page gives is out now! Go check it out!

Len

Last update:
May 18, 2026

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

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page