Rename 'cannocial_name_form' to 'canonical_name_form'

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1433 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2009-12-04 06:04:57 +00:00
parent 46111fcbad
commit 47aa7ce923
10 changed files with 265 additions and 258 deletions
+1 -1
View File
@@ -257,7 +257,7 @@ void Reader::readLine(bool in_string) {
indent += 1;
}
}
key = cannocial_name_form(trim(key));
key = canonical_name_form(trim(key));
value = pos == String::npos ? _("") : trim_left(line.substr(pos+1));
if (key.empty() && pos!=String::npos) key = _(" "); // we don't want an empty key if there was a colon
}
+1 -1
View File
@@ -51,7 +51,7 @@ void Writer::writePending() {
}
indentation += 1;
writeIndentation();
writeUTF8(stream, cannocial_name_form(pending_opened[i]));
writeUTF8(stream, canonical_name_form(pending_opened[i]));
}
pending_opened.clear();
}
+1 -1
View File
@@ -178,7 +178,7 @@ String capitalize_sentence(const String& s) {
return ret;
}
String cannocial_name_form(const String& str) {
String canonical_name_form(const String& str) {
String ret;
ret.reserve(str.size());
bool leading = true;
+2 -2
View File
@@ -152,12 +152,12 @@ String capitalize(const String&);
/** for use in dialogs */
String capitalize_sentence(const String&);
/// Convert a field name to cannocial form
/// Convert a field name to canonical form
/** - lower case and ' ' instead of '_'.
* - non alphanumeric characters are droped
* - "camalCase" is converted to words "camel case" (TODO)
*/
String cannocial_name_form(const String&);
String canonical_name_form(const String&);
/// Returns the singular form of a string
/** Used for reflection, for example "vector<T> apples" is written with keys