E-MailRelay
|
A word-wrap class. More...
#include <gstringwrap.h>
Static Public Member Functions | |
static std::string | wrap (const std::string &text, const std::string &prefix_first, const std::string &prefix_other, std::size_t width_first=70U, std::size_t width_other=0U, bool preserve_spaces=false) |
Does word-wrapping of UTF-8 text. More... | |
static std::size_t | wordsize (const std::string &) |
Returns the number of characters in UTF-8 text. More... | |
A word-wrap class.
Definition at line 36 of file gstringwrap.h.
|
static |
Returns the number of characters in UTF-8 text.
Definition at line 183 of file gstringwrap.cpp.
|
static |
Does word-wrapping of UTF-8 text.
The return value is a string with embedded newlines. If 'preserve_spaces' is true then all space characters between input words that end up in the middle of an output line are preserved. There is no special handling of tabs or carriage returns. The 'first/other' parameters distinguish between the first output line and the rest.
Definition at line 119 of file gstringwrap.cpp.