View Single Post
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 04-04-2020 , 20:01   Re: String parsing problem
Reply With Quote #3

Code:
text[index] == ',' || text[index + 1] == EOS) && parenthesesCounter == 0
This is the expression you're using to determine whether to copy something over into your results. It can only possibly be true when parentheses are balanced. Since your sample input starts with an open parentheses, that means it'll only actually be true at the very end, when the parentheses balance out (and the next character is null for the end of the string).

The code from fysiks doesn't appear to do what you want.
Fyren is offline