Strlen

strlen

Returns the number of characters in a string.

Spec

strlen(string)
  • string: The input string to measure.

Return Value

An integer representing the number of characters in the string.

Example

Get the length of a string:

datatable(s:string) ["Hello, world!"]
| extend length = strlen(s)

Expected output:

slength
Hello, world!13

Get the length of a column value:

datatable(s:string) ["abc", "abcdef", ""]
| extend len = strlen(s)

Expected output:

slen
abc3
abcdef6
0