Im having entering string array and each array has one expression. I want to split the expressions with considering all conditional operators. My expression may be like str[0] , str[1], str[2]
FIC >= 1 && PIC == 1
FCV<=0.2 && FCC>=12
Now i have to split first string in to 'FIC >=1' ' PIC ==1'
i can do this by using strtok (str[0],"&&");
And again i have split 'FIC >= 1' in to string as 'FIC' and '>=' and '1' . Then i have separate function in my application to get the value of 'FIC' and i will check this condition is true.If yes then i have to do some action.
But this expression will not be the same, some expression has more number of && operators and more conditional operators. How can i split this
strtokis intended for simple tokenization. For example, one intended use is to find all the sequences of characters that are separated by spaces, tabs, or new-line characters, such as separated “abc def ghi” into “abc”, “def”, and “ghi”. It only recognizes individual characters, which are listed in the second string. E.g., to separate at spaces, tabs, and new-line characters, you would use a second string containing one space, one tab, and one new-line. Repeating “&” will not makestrtokrecognize “&&”.