Best ways of parsing a URL using C?

后端 未结 10 1823
死守一世寂寞
死守一世寂寞 2020-11-27 15:36

I have a URL like this:

http://192.168.0.1:8080/servlet/rece

I want to parse the URL to get the values:

IP: 192.168.0.1
Por         


        
10条回答
  •  萌比男神i
    2020-11-27 15:44

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

提交回复
热议问题