str_len(str)

Returns the number of bytes in a string.

Please not that the value returned may not correspond to the actual number of characters in sequences of multi-byte or variable-length encoded characters.

The string is zero-indexed.

Parameters

str: source string.

Return Value

The number of bytes in the input string.

Example command:

  • str_len("Hello")
    • returns 5
  • str_len("")
    • returns 0