I'm using istringstream
to break the tokens of a string. Let's say I have a string like this:
print "this is a test"
It breaks it into 5 tokens:
print | "this | is | a | test"
where it should generate 2 tokens:
print | "this is a test"
Is there a good way to fix it? I tried doing it manually, by finding the quotes in the text and doing a substring, but it's too much work.
I guess there should be a simpler way, or is istringstream
the way to do it?