96 typedef string::size_type pos;
100 const pos skip = delim.length();
102 string nextline =
"";
104 while( is || nextline.length() > 0 )
108 if( nextline.length() > 0 )
115 std::getline( is, line );
119 line = line.substr( 0, line.find(comm) );
122 if( sentry !=
"" && line.find(sentry) != string::npos )
return is;
125 pos delimPos = line.find( delim );
126 if( delimPos < string::npos )
129 string key = line.substr( 0, delimPos );
130 line.replace( 0, delimPos+skip,
"" );
135 bool terminate =
false;
136 while( !terminate && is )
138 std::getline( is, nextline );
141 string nlcopy = nextline;
143 if( nlcopy ==
"" )
continue;
145 nextline = nextline.substr( 0, nextline.find(comm) );
146 if( nextline.find(delim) != string::npos )
148 if( sentry !=
"" && nextline.find(sentry) != string::npos )
153 if( nlcopy !=
"" ) line +=
"\n";