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 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().
sscanf()
2.1m questions
2.1m answers
60 comments
57.0k users