src/base/inifile.cc
// Take string of the form "<section>:<parameter>=<value>" and add to
// database.  Return true if successful, false if parse error.
Take string of the form ":=" and add to
database.  Return true if successful, false if parse error.
Take string of the form " : = " and add to database . Return true if successful false if parse error .
bool
IniFile::add(const std::string &str)
{
    std::string::size_type offset = str.find(':');
    if (offset == std::string::npos)  
        return false;
    std::string sectionName = str.substr(0, offset);
    std::string rest = str.substr(offset + 1);
    eat_white(sectionName);
    Section *s = addSection(sectionName);
    return s->add(rest);
}
bool IniFile :: add ( const std :: string & str ) { std :: string :: size_type offset = str . find ( ' ' ) ; if ( offset == std :: string :: npos ) return false ; std :: string sectionName = str . substr ( 0 , offset ) ; std :: string rest = str . substr ( offset + 1 ) ; eat_white ( sectionName ) ; Section * s = addSection ( sectionName ) ; return s -> add ( rest ) ; }
Take string of the form "<section>:<parameter>=<value>" and add to
database.
Take string of the form " <section > : <parameter > = <value > " and add to database .
// find ':' // no ':' found