diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-06-10 16:02:29 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-06-11 14:27:09 +0200 |
| commit | 97789d374c40f4f7fc8feb19c1235ca09ad2e06e (patch) | |
| tree | 38373d43cf0f5c36321fe46a1d38c7992acd3887 /src/util.h | |
| parent | Add `-version` option to get just the version (diff) | |
| download | discoin-97789d374c40f4f7fc8feb19c1235ca09ad2e06e.tar.xz discoin-97789d374c40f4f7fc8feb19c1235ca09ad2e06e.zip | |
util: Add function FormatParagraph to format paragraph to fixed-width
This is to be used for the `-version` and `-help` messages.
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index e07036579..da1810a3d 100644 --- a/src/util.h +++ b/src/util.h @@ -286,6 +286,11 @@ inline std::string HexStr(const T& vch, bool fSpaces=false) return HexStr(vch.begin(), vch.end(), fSpaces); } +/** Format a paragraph of text to a fixed width, adding spaces for + * indentation to any added line. + */ +std::string FormatParagraph(const std::string in, size_t width=79, size_t indent=0); + inline int64_t GetPerformanceCounter() { int64_t nCounter = 0; |