Function TCOD_console_get_height_rect_wn

Function Documentation

int TCOD_console_get_height_rect_wn(int width, size_t n, const char *str)

Return the height of the word-wrapped text with the given width.

New in version 1.19.

Parameters
  • width – The maximum width of the bounding region in tiles.

  • n – The length of the string buffer str[n] in bytes.

  • str – The text to print. This string can contain libtcod color codes.

Returns

int The height of the word-wrapped text as if it were printed, or a negative error code on failure.