punctuation breaking is now handled by check_spelling function. Symbols are now handled correctly (i.e. they are considered to be always correct)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1268 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-12-29 22:24:16 +00:00
parent cbfde59494
commit 09216eca5d
6 changed files with 87 additions and 37 deletions
+9
View File
@@ -122,6 +122,15 @@ String strip_last_word(const String& s) {
}
}
const String word_start = String(_("[({\"\'")) + LEFT_SINGLE_QUOTE + LEFT_DOUBLE_QUOTE;
const String word_end = String(_("])}.,;:?!\"\'")) + RIGHT_SINGLE_QUOTE + RIGHT_DOUBLE_QUOTE;
void trim_punctuation(const String& str, size_t& start, size_t& end) {
start = str.find_first_not_of(word_start, start);
end = str.find_last_not_of(word_end, min(end,str.size()-1)) + 1;
if (start >= end) start = end;
}
// ----------------------------------------------------------------------------- : Caseing
/// Quick check to see if the substring starting at the given iterator is equal to some given string