Coding Challenge #14

Coding Challenge Series / Technical Interview Series

Efficiently parse the following string into corresponding key-value pairs:

Content-Type: text/xml;

Content-Length: 246;

Connection: Keep-Alive;

Security-Token: ‘F52AB22B890E22:55AB072CF’;

(The above string is an example of the types of strings that might be encountered).