split - C function for separate a string in array of chars -


i want create function split text using separator in c. 2 parameters text , separator passed function , function should return array of chars.

for example if string hello word of c , separator white space.

then function should return,

 0. hello   1. word    2. of   3. c 

as array of chars.

any suggestions?

does strtok not suit needs ?


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -