Returns the number of characters in a string field.

ParameterTypeRequiredDefaultDescription
asstringfalse_lengthName of output field.
fieldstringtrue The name of the input field to length. [a]

[a] When you provide only one parameter, the implied parameter is field

Examples

The number of characters in the @rawstring field

humio
length(@rawstring)

The number of characters in the @rawstring field, putting it in the field rawLength

humio
length(@rawstring, as="rawLength")