Automatic use of singular names -> even more use of REFLECT instead of REFLECT_N.

This also works better for GetMember, since the plural names (which make sense for scripts) are the default.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@16 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-11 22:58:55 +00:00
parent 9de743030e
commit 156d1f6632
8 changed files with 36 additions and 23 deletions
+6
View File
@@ -133,3 +133,9 @@ String cannocial_name_form(const String& str) {
}
return ret;
}
String singular_form(const String& str) {
assert(str.size() > 1);
assert(str.GetChar(str.size() - 1) == _('s')); // ends in 's'
return str.substr(0, str.size() - 1);
}