wrapableText

Creates text that wraps when it exceeds a given width. It does so by adding a new line at the last space given before the text exceeds the width and does so for all of the text.

dstring
wrapableText
(
dstring text
,
string fontName
,
size_t fontSize
,
size_t width
)

Parameters

text dstring

The text to wrap.

fontName string

The font used for the text.

fontSize size_t

The size of the font used.

width size_t

The width to wrap the text at when it exceeds.

Return Value

Type: dstring

A string that is wrapable based on the original given string and conditions.

Meta