Extracting url from string in C
How can i extract urls from a string in C?
Say we have "bla bla bla bla bla blaaa http://www.stackoverflow.com blaaa bllaaa"
i want to pass that link to a开发者_开发百科 varible.
How can i do that?
Thanks.
- Search for
"http://"
usingstrstr
function. - Starting for this pointer stop on first null or space, if space set on this position null.
- Now you pointer resulted in step 1, pointing to your url.
精彩评论