Jiang Bian Jiang Bian - 5 months ago 36
C Question

Best ways of parsing a URL using C?

I have a URL like this:

I want to parse the URL to get the values:

Port: 8080
page: /servlet/rece

How do I do that?


Write a custom parser or use one of the string replace functions to replace the separator ':' and then use sscanf().