Hi,
I am very familiar with unix commands but not as familiar with C. Can anyone provide me a function in C which works similar to cut fuction in unix. The cut command is very useful for parsing strings. Basically my problem is that I have a string of characters delimited by colons ) and I would like my program to read each line and read the data in each field into a variable.
for example if the string is
1234:232:222
I would like to read 1234 into variable a, 232 into b and 222 into c.
Thanks
Ahsan
I am very familiar with unix commands but not as familiar with C. Can anyone provide me a function in C which works similar to cut fuction in unix. The cut command is very useful for parsing strings. Basically my problem is that I have a string of characters delimited by colons ) and I would like my program to read each line and read the data in each field into a variable.
for example if the string is
1234:232:222
I would like to read 1234 into variable a, 232 into b and 222 into c.
Thanks
Ahsan