len

Table of Contents

Function

len — the type-dependent length of a value

Synopsis

len(v: record|array|set|map|type|bytes|string|ip|net|error) -> int64

Description

The len function returns the length of its argument val. The semantics of this length depend on the value’s type.

Supported types include:

  • record
  • array
  • set
  • map
  • error
  • bytes
  • string
  • ip
  • net
  • type

Example:

Take the length of various types:

yield {this,len:len(this)}
[1,2,3]
|["hello"]|
{a:1,b:2}
"hello"
10.0.0.1
1
Loading...
Next: levenshtein

SuperDB