Goto main content

length

Returns the length of an expression

LENGTH

NAME

length - Returns the length of an expression

SYNOPSIS

length(expression)

DESCRIPTION

This function is used to return the length of an expression, which is characterized by the number of elements inside of this expression.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

res={_{length(2.5); }}. return res=3.
res={_{length(-2.5); }}. return res=4.
res={_{length(null); }}. return res=0.
res={_{length(undefined); }}. return res=0.
res={_{length(567); }}. return res=3.
res={_{length("5623"); }}. return res=4.
res={_{length(true); }}. return res=4.
res={_{length(false); }}. return res=5.
res={_{length([1,2,3]); }}. return res=3;
res={_{length([a:1,b:2,c:3]); }}. return res=3;
res={_{length("ée"); }}. return res=2.

SEE ALSO

{{ include("includes/strings.sn") }}

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2022 extenso Inc. All rights reserved.