len multimethod

Methods

len(arr:Arr)
Get number of elements in the array

Returns

Int
len(s:Str)
Get Str length in bytes

Returns

Int
len(h:Hash)
Get number of key-value pairs in a Hash

Returns

Int

Example

{"a": 1, "b": 2}.len()  # 2
len(mm:MultiMethod) Source: stdlib.ngs:407
Number of methods in MultiMethod
len(al:ArrLike) Source: stdlib.ngs:1895
Get length of the underlying array.
len(hl:HashLike) Source: stdlib.ngs:2029
Get number of key-value pairs in a HashLike

Returns

Int
len(s:Set) Source: stdlib.ngs:2197
Get number of items in the set

Returns

Int
len(r:NumRange) Source: stdlib.ngs:2693
Length of a NumRange. Only defined for Int start and end. Equals to how many times cb will be invoked in each(r, cb).
len(fb:FullBox) Source: stdlib.ngs:4293
Length of FullBox

Returns

1
len(eb:EmptyBox) Source: stdlib.ngs:4297
Length of EmptyBox

Returns

0
len(i:Int) Source: stdlib.ngs:4639
Useful for knowing how much times each() callback would be invoked. Alternatively, how many elements map() result would have.

Returns

i
len(rd:ResDef)
Check how many resources are matching given resource definition. Throws InvalidArgument if resources were not looked up yet.
len(t:Table)
Get number of rows in the table.
len(t:Table)
Get number of rows in the table.