Functions | |
template<class OStreamableT> | |
std::string | stringify (const OStreamableT &arg) throw () |
Use this one to convert various objects to std::string. | |
int | getTerminalWidth () throw () |
Returns the width of the current terminal or 80. | |
std::string | addIndent (const std::string &str, unsigned indent) throw () |
Helper function to add indent to strings. | |
std::string | optimizeForLineWidth (const std::string &str, int width) throw () |
This function returns str optimized for a given linewidth. | |
std::string | optimizeForTerminalWidth (const std::string &str) throw () |
This function returns str optimized for the current terminal width. | |
std::string | stringify (bool arg) throw () |
std::string libthrowable::util::addIndent | ( | const std::string & | str, | |
unsigned | indent | |||
) | throw () |
Helper function to add indent to strings.
int libthrowable::util::getTerminalWidth | ( | ) | throw () |
Returns the width of the current terminal or 80.
std::string libthrowable::util::optimizeForLineWidth | ( | const std::string & | str, | |
int | width | |||
) | throw () |
This function returns str optimized for a given linewidth.
std::string libthrowable::util::optimizeForTerminalWidth | ( | const std::string & | str | ) | throw () [inline] |
This function returns str optimized for the current terminal width.
std::string libthrowable::util::stringify | ( | bool | arg | ) | throw () [inline] |
std::string libthrowable::util::stringify | ( | const OStreamableT & | arg | ) | throw () [inline] |
Use this one to convert various objects to std::string.
arg | If "os" is of type std::ostream, "os << arg;" must be a legal statement. |