strtok question

new topic     » topic index » view thread      » older message » newer message

For Kat or any others familiar with the lib:

Question:  Is there an easy way to keep some separators while removing 
others?  For example, if I was parsing a BASIC-like language and I 
wanted to keep comparison and math operators while stripping white 
space?

example:
if x=y then --> {"if","x","=","y","then"}

I was hoping to do a single pass because I figured I could always first 
replace "=" with " = " then parse on white space...

Thanks,
-- Brian

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu