utf8_strtrim


Description:


public string utf8_strtrim (string? str, int max_chars)

Creates a (possibly trimmed) copy of str.

The string is cut if it exceeds max_chars characters or on the first newline. The fact that the string was trimmed is indicated by appending an ellipsis.

Parameters:

str

an UTF-8 encoded string (or null)

max_chars

the maximum number of characters before the string get trimmed

Returns:

A (possibly trimmed) copy of str which should be freed using g_free when it is not needed any longer.


Namespace: Gimp
Package: gimp-3.0