How to safety parse tab-delimiter string ? for example:
test\tbla-bla-bla\t2332 ?
How to safety parse tab-delimiter string ? for example: test\tbla-bla-bla\t2332 ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
strtok()is a standard function for parsing strings with arbitrary delimiters. It is, however, not thread-safe. Your C library of choice might have a thread-safe variant.Another standard-compliant way (just wrote this up, it is not tested):