19 #ifndef SBUILD_KEYFILE_H
20 #define SBUILD_KEYFILE_H
22 #include <sbuild/sbuild-basic-keyfile.h>
103 if (line.length() == 0)
107 else if (line[0] ==
'#')
113 else if (line[0] ==
'[')
115 std::string::size_type fpos = line.find_first_of(
']');
116 std::string::size_type lpos = line.find_last_of(
']');
117 if (fpos == std::string::npos || lpos == std::string::npos ||
120 group = line.substr(1, fpos - 1);
122 if (
group.length() == 0)
130 std::string::size_type pos = line.find_first_of(
'=');
131 if (pos == std::string::npos)
135 key = line.substr(0, pos);
136 if (pos == line.length() - 1)
139 value = line.substr(pos + 1);