somefile : anotherfile

and

somefile:anotherfile

I would like to have a function that would work for both of these string

I want to separate this string into

somefile
:
anotherfile

what should I use?

if I use strtok(line, ":"), then it wouldn't work right?