wibble 1.1
|
Simple string wrapper. More...
#include <wordwrap.h>
Public Member Functions | |
WordWrap (const std::string &s) | |
Creates a new word wrapper that takes data from the given string. | |
void | restart () |
Rewind the word wrapper, restarting the output from the beginning of the string. | |
bool | hasData () const |
Returns true if there is still data to be read in the string. | |
std::string | get (unsigned int width) |
Get a line of text from the string, wrapped to a maximum of width characters. | |
Simple string wrapper.
wibble::text::Wrap takes a string and splits it in lines of the give length with proper word wrapping.
Example:
|
inline |
Creates a new word wrapper that takes data from the given string.
Get a line of text from the string, wrapped to a maximum of width
characters.
|
inline |
Returns true if there is still data to be read in the string.
|
inline |
Rewind the word wrapper, restarting the output from the beginning of the string.