Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char *Tokenizer::toString()
- {
- char *res = new char[buffer.length()];
- int i = 0;
- bool isEscape = false;
- for (char j : buffer)
- {
- if (j == '"' && !isEscape)
- continue;
- if (j == '\\' && !isEscape)
- {
- isEscape = true;
- continue;
- }
- res[i++] = isEscape ? toEscape(j) : j;
- if (isEscape) isEscape = false;
- }
- res[i++] = '\0';
- return res;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement