mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
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:
+5
-5
@@ -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 ")) ||
|
||||
|
||||
Reference in New Issue
Block a user