Determines the length of a string or binary object
len(Object)
returns numeric
Name | Type | Required | Default | Description |
---|---|---|---|---|
Object | any | Yes | A string or variable name |
To get the total length of the string or binary object
someString = 'ColdFusion';
writeOutput(len(someString));
For CF11+ Lucee4.5+
colorArray = ['Green','red','blue'];
writeOutput(colorArray.len());