Returns the number of characters in a string field.

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

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")