Len()
Determines the length of a string, array or struct
Len( value=object );
Returns: Number
Argument | Description |
---|---|
value
object,
required
|
the object to measure the length of Alias: string, object |
Examples
Simple example for Len
str="I love lucee";
dump(var=len(str), label="String");
dump(str);
arr =[1,2,3];
dump(var=len(arr), label="Array");
dump(arr);
st ={ a: 1};
dump(var=len(st), label="Struct");
dump(st);
q =query(a:["1,2,3"]);
dump(var=len(st), label="Query");
dump(q);
Member Function
str=['I','love','lucee'];
writeOutput(str.len());//3
See also
- Arrays
- Core CFML Language
- Strings
- Structures
- ArrayLen()
- QueryRecordCount()
- StringLen()
- StructCount()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)