diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2010-10-09 17:28:19 -0500 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2010-10-09 17:58:39 -0500 |
commit | 7187bfc6f67050a8aca2dc4370204673328fbe31 (patch) | |
tree | c374122a0750d4f06e762c84772252b02ad1f38c /crawl-ref/source/kills.cc | |
parent | 26106d48b43f594c29b175a0c80af721c0203d87 (diff) | |
download | crawl-ref-7187bfc6f67050a8aca2dc4370204673328fbe31.tar.gz crawl-ref-7187bfc6f67050a8aca2dc4370204673328fbe31.zip |
Move apostrophization functions from kills.cc/h to libutil.cc/h.
Diffstat (limited to 'crawl-ref/source/kills.cc')
-rw-r--r-- | crawl-ref/source/kills.cc | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/crawl-ref/source/kills.cc b/crawl-ref/source/kills.cc index f54e599d53..8c584efeed 100644 --- a/crawl-ref/source/kills.cc +++ b/crawl-ref/source/kills.cc @@ -397,27 +397,6 @@ kill_def::kill_def(const monster* mon) : kills(0), exp(0) add_kill(mon, get_packed_place()); } -std::string apostrophise(const std::string &name) -{ - if (name.empty()) - return (name); - - if (name == "it" || name == "It") - return (name + "s"); - - const char lastc = name[name.length() - 1]; - return (name + (lastc == 's' ? "'" : "'s")); -} - -std::string apostrophise_fixup(const std::string &msg) -{ - if (msg.empty()) - return (msg); - - // XXX: This is rather hackish. - return (replace_all(msg, "s's", "s'")); -} - // For monster names ending with these suffixes, we pluralise directly without // attempting to use the "of" rule. For instance: // |