Possible Duplicate:
Modify a char* string in C
I have:
char* htmlstring = "htmldata"
How do I extract:
char* htmlstring1 = "htmldata 开发者_如何转开发before </body>tag"
char* htmlstring2 ="htmldata after and including</body> tag"
Can I use strstr
? Whats the best approach?
strncpy(destination_string, source + start, count)
It's not really safe, but works. You should wrap it around.
精彩评论