mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Fix #35
This commit is contained in:
@@ -115,12 +115,6 @@ String strip_last_word(const String& s) {
|
||||
const String word_start_chars = String(_("[({\"\'")) + LEFT_SINGLE_QUOTE + LEFT_DOUBLE_QUOTE;
|
||||
const String word_end_chars = 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_chars, start);
|
||||
end = str.find_last_not_of(word_end_chars, min(end,str.size()-1)) + 1;
|
||||
if (start >= end) start = end;
|
||||
}
|
||||
|
||||
bool is_word_start_punctuation(Char c) {
|
||||
return word_start_chars.find_first_of(c) != String::npos;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user