fgl_width()

Returns the number of columns needed to represent the printed version of the expression.

Syntax

fgl_width(
   expression STRING )
  RETURNING result INTEGER
  1. expression is any valid string expression.

Usage

The fgl_width() function returns the number of columns that will be used if you display expression on a text terminal.

If the parameter is NULL, the function returns zero.

The number of columns used by a character depends on the glyph (i.e. the graphical symbol used to draw the character on the screen). For example, an ASCII character like A uses one column, while one Chinese ideogram uses 2 columns (i.e. on a text terminal, the size of one Chinese ideogram takes the same size as AB).

Trailing blanks are counted in the length of the string.