skipQuotesString function
void
skipQuotesString()
Implementation
void skipQuotesString(
String s, TIntRef p, String quoteChar, bool escapeSlash, bool escapeRepeat) {
p.value++;
bool notRepeatEscaped;
do {
notRepeatEscaped = true;
while (p.value < s.length && s[p.value] != quoteChar) {
if (escapeSlash &&
s[p.value] == '\\' &&
p.value + 1 < s.length) {
p.value += 2; // make sure we handle escaped quotes and double backslashes (original comment's meaning)
} else {
p.value++;
}
}
if (p.value < s.length && s[p.value] == quoteChar) {
p.value++; // skip final '
if (p.value < s.length && s[p.value] == quoteChar && escapeRepeat) {
// Handle escaping by '' (original comment kept as-is)
notRepeatEscaped = false;
p.value++;
}
}
} while (!notRepeatEscaped);
}