diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-04 21:11:19 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-04 21:11:19 +0000 |
commit | 8bd7484493c7e96dd497e8f8e3fc39514265ff5d (patch) | |
tree | 8ca3c36b70feafd41dcb1cb0b18448c728d24ebf /crawl-ref | |
parent | d775567ab5dcdba8bb73b0f9771f84a0258e3405 (diff) | |
download | crawl-ref-8bd7484493c7e96dd497e8f8e3fc39514265ff5d.tar.gz crawl-ref-8bd7484493c7e96dd497e8f8e3fc39514265ff5d.zip |
Pluralise "knife" correctly (to "knives") [1825553]
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2755 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/libutil.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc index ed0b640680..d94ba252a8 100644 --- a/crawl-ref/source/libutil.cc +++ b/crawl-ref/source/libutil.cc @@ -310,6 +310,9 @@ std::string pluralise(const std::string &name, return name.substr(0, name.length() - 1) + "es"; else if (ends_with(name, "y")) return name.substr(0, name.length() - 1) + "ies"; + else if (ends_with(name, "fe")) + // knife -> knives + return name.substr(0, name.length() - 2) + "ves"; else if (ends_with(name, "elf") || ends_with(name, "olf")) // Elf, wolf. Dwarfs can stay dwarfs, if there were dwarfs. return name.substr(0, name.length() - 1) + "ves"; |