Function
AppStreammarkup_strsplit_words
since: 0.14.0
Declaration [src]
gchar**
as_markup_strsplit_words (
const gchar* text,
guint line_len
)
Description [src]
Splits up a long line into an array of smaller strings, each being no longer than line_len. Words are not split.
Available since: 0.14.0
Parameters
text-
Type:
const gchar*The text to split.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. line_len-
Type:
guintThe maximum length of the output line.
Return value
Type: An array of utf8
Lines, or NULL in event of an error. If text holds no words at all, the result is a zero-length vector that
contains nothing but its NULL terminator, so callers must not assume
that a non-NULL result has a first element.
The array is NULL-terminated. |
| The caller of the function takes ownership of the data, and is responsible for freeing it. |
| Each element is a NUL terminated UTF-8 string. |