185 {
187
188 size_t srcIndex = 0;
189 size_t dstIndex = 0;
190 while (srcIndex < N)
191 {
192 size_t matchIndex = 0;
193 while (matchIndex < K - 1 && srcIndex + matchIndex < N - 1 && expr[srcIndex + matchIndex] == remove[matchIndex])
194 matchIndex++;
195 if (matchIndex == K - 1)
196 srcIndex += matchIndex;
197 result.
Data[dstIndex++] = expr[srcIndex] ==
'"' ?
'\'' : expr[srcIndex];
198 srcIndex++;
199 }
200 return result;
201 }