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