Macaw OS C reference

Function wraptext

#include <macaw.h>
int wraptext(const char *s, int columns);

Breaks text into lines short enough to fit, breaking at spaces where it can. Read the lines afterwards with wrapline.

Parameters

sconst char *
The text to break up. Each \n in it starts a new line.
columnsint
The most characters a line can have. Below 1 counts as 1.

Returns int

How many lines there are.

In Drawing, with cls, pset, pget, line, rect, rectfill, circ, circfill, tri, text, textwidth, clip, noclip, camera, box, centertext, shadowtext, textscaled, wrapline.