diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-04-02 15:28:29 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-04-02 15:28:29 +0200 |
commit | 8f7415c536941ab30040be7bb925cac37a79c21f (patch) | |
tree | d061504e5351c7a41b0d7b8e168d0734d3eaece1 /crawl-ref/source/libutil.h | |
parent | 6d6160c747fda28a5fb352b3b9a59266c61e6db9 (diff) | |
download | crawl-ref-8f7415c536941ab30040be7bb925cac37a79c21f.tar.gz crawl-ref-8f7415c536941ab30040be7bb925cac37a79c21f.zip |
Preserve indentation when wrapping a line.
Quotation marks are considered to be indentation, so paragraphs are wrapped
like this:
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
est laborum.”
Diffstat (limited to 'crawl-ref/source/libutil.h')
-rw-r--r-- | crawl-ref/source/libutil.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/libutil.h b/crawl-ref/source/libutil.h index cb1cb6e1d8..44bf5e2688 100644 --- a/crawl-ref/source/libutil.h +++ b/crawl-ref/source/libutil.h @@ -78,7 +78,8 @@ int strwidth(const char *s); int strwidth(const std::string &s); std::string chop_string(const char *s, int width, bool spaces = true); std::string chop_string(const std::string &s, int width, bool spaces = true); -std::string wordwrap_line(std::string &s, int cols, bool tags = false); +std::string wordwrap_line(std::string &s, int cols, bool tags = false, + bool indent = false); bool version_is_stable(const char *ver); |