14 bool ReadLine(ifstream& ifs, vector<string>& result)
21 if (buf.empty())
continue;
22 while (buf[0] ==
' ' || buf[0] ==
'\t' || buf[0] ==
'\r') buf.erase(0, 1);
23 if (buf.empty() || buf[0] ==
'#')
continue;
24 if (buf.size() > 1 && (buf[0] ==
'-' && buf[1] ==
'-'))
continue;
30 if (buf.empty())
return false;
33 auto pos = buf.find_first_of(
'/');
34 if (pos != string::npos) {
41 if (s ==
'\'' || s ==
',') s =
' ';
44 istringstream tmp(buf);
45 while (tmp >> buf) result.push_back(buf);
53 for (
auto& str : result) {
54 auto pos = str.find(
'*');
55 if (pos == string::npos) {
58 USI num = atoi(str.substr(0, pos).c_str());
60 string val =
"DEFAULT";
65 val = str.substr(pos + 1, len - (pos + 1));
67 for (
USI i = 0; i < num; i++) tmp.push_back(val);
unsigned int USI
Generic unsigned integer.