summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/format.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-04-07 10:23:28 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-04-15 10:58:05 +0200
commit41d6e07ffc64866ab1cf5f55f4c4eab95c0276fb (patch)
tree0005578b481a6775e1e26370d56d84189f3a98ca /crawl-ref/source/format.cc
parent031ae6b23c9b5a5e06bb5db974686f990cd8af82 (diff)
downloadcrawl-ref-41d6e07ffc64866ab1cf5f55f4c4eab95c0276fb.tar.gz
crawl-ref-41d6e07ffc64866ab1cf5f55f4c4eab95c0276fb.zip
Capitalized mprf().
It's going to be the default for mprf() since 99% uses are capitalized, but it's safer to do this piecemeal then sed it back.
Diffstat (limited to 'crawl-ref/source/format.cc')
-rw-r--r--crawl-ref/source/format.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/format.cc b/crawl-ref/source/format.cc
index 62c8a5ab3d..9c44e6b561 100644
--- a/crawl-ref/source/format.cc
+++ b/crawl-ref/source/format.cc
@@ -510,6 +510,16 @@ void formatted_string::all_caps()
uppercase(ops[i].text);
}
+void formatted_string::capitalize()
+{
+ for (unsigned int i = 0; i < ops.size(); i++)
+ if (ops[i].type == FSOP_TEXT && !ops[i].text.empty())
+ {
+ ops[i].text = uppercase_first(ops[i].text);
+ break;
+ }
+}
+
int count_linebreaks(const formatted_string& fs)
{
std::string::size_type where = 0;