Fixed sub menus

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@94 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-11-25 01:36:43 +00:00
parent 563afde7a3
commit 9a62445621
4 changed files with 21 additions and 17 deletions
+5 -5
View File
@@ -98,12 +98,12 @@ bool is_substr(const String& s, String::iterator it, const Char* cmp) {
String capitalize(const String& s) {
String result = s;
bool afterSpace = true;
bool after_space = true;
FOR_EACH_IT(it, result) {
if (*it == ' ') {
afterSpace = true;
} else if (afterSpace) {
afterSpace = false;
if (*it == _(' ') || *it == _('/')) {
after_space = true;
} else if (after_space) {
after_space = false;
if (it != s.begin() &&
(is_substr(result,it,_("is ")) || is_substr(result,it,_("the ")) ||
is_substr(result,it,_("in ")) || is_substr(result,it,_("of ")) ||