aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-06-10 16:02:29 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-06-11 14:27:09 +0200
commit97789d374c40f4f7fc8feb19c1235ca09ad2e06e (patch)
tree38373d43cf0f5c36321fe46a1d38c7992acd3887 /src/util.h
parent96b733e99694e74dcd38b16112655f7e1ea2d43b (diff)
downloadbitcoin-97789d374c40f4f7fc8feb19c1235ca09ad2e06e.tar.xz
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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index e070365790..da1810a3d3 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;