std::string line;
while(stlsoft::read_line(stdin, line
, stlsoft::read_line_flags::recogniseAll))
{
. . . // process line
}Now it will also work with an iterator range of arbitrary type, as in:
platformstl::memory_mapped_file f("file.txt");
char const* const begin = static_cast(f.memory());
char const* const end = begin + f.size();
std::string line;
while(stlsoft::read_line(begin, end, line
, stlsoft::read_line_flags::recogniseAll))
{
. . . // process line
}
No comments:
Post a Comment