Цитата(sergeeff @ Sep 1 2008, 21:49)

Для этого дела в С есть функция strtok()
Цитата из man 3 strtok (а заодно strtok_r)
Цитата
Avoid using these functions. If you do use them, note that:
These functions modify their first argument.
These functions cannot be used on constant strings.
The identity of the delimiting character is lost.
The strtok() function uses a static buffer while parsing, so it's not thread safe. Use str-
tok_r() if this matters to you.