Boost logo

Boost Users :

Subject: [Boost-users] Reading key-value pairs from a string
From: Zdravko Monov (zdravko.monov_at_[hidden])
Date: 2009-04-13 04:19:35


Dear boost-users,

I am currently working on a C++ project that includes reading and
parsing some files.
Given a string with certain file contents S, I would like to attempt to
compare it against a certain pattern. In particular, the contents have
the form key : value. Certain keys are obligatory, while others may or
may not exist (my program then supplies the default values).
Can you recommend me a boost facility that can help me reading this type
of data? My problem is that between key, : and value there could be
blank spaces, tabs etc. The type of value could be a string, an int, or
double.

Thanks in advance!


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net