str_width (STRING*, FONT*)

Returns the width of the string in a given font. A7.30

Parameters:

STRING* - Pointer to a STRING or char array (3 or more chars; must not contain line feeds).
FONT* - FONT pointer, or NULL for the default Arial font.

Returns:

Horizontal size of the string in pixels. Leading or ending spaces or tabs are ignored.

Speed:

Medium

Example:

var x = str_width("Hello",NULL);

See also:

STRING, FONT, str_len

  ► latest version online