fgl_mblen()

Returns the number of bytes of the first character in a string.

Syntax

fgl_mblen(
   str STRING )
  RETURNS INTEGER
  1. str is any valid string expression.

Usage

The fgl_mblen() function returns the number of bytes used to encode the first character of the specified string, in the current application locale.

When using a multi-byte character set like UTF-8, you can use this function to compute the size in bytes of the first character in the string. Then, you can use this size to identify the position of the next character in the string. This function is mandatory to scan multi-byte strings.

If the parameter is NULL, the function returns zero.

If the parameter starts with an invalid multibyte character, the function returns -1.