|
-
January 18th, 2010, 06:42 AM
#1
std::string split
Hi,
I am dealing with the http header. it is basically made up of pairs like
the following:
key: value\n\r
Now, I need to capture those values and push them into an associative array,
so basically I am going to use std::string this way:
#include <string>
#include <map>
using namespace std;
map<string, string> header;
Yet, since I am quite new to std::string I'd like to know how to split one
line based on ": ", then I am goit to remove any extra whitespaces by using
my own chomp()
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|