30 if (is.peek() != comment_char)
34 is.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
41 if (!line.empty() && *line.rbegin() ==
'\r')
43 line.resize(line.size()-1);
54 std::string out_str = ss.str();
55 out_str = out_str.substr(out_str.find_first_not_of(
" \t"));
62 std::ostringstream oss;
63 oss << std::setw(digits) << std::setfill(
'0') << i;
68 inline int to_int(
const std::string& str)
71 std::stringstream(str) >> i;
std::string to_string(int i)
void skip_comment_lines(std::istream &is, const char comment_char)
std::string to_padded_string(int i, int digits)
int to_int(const std::string &str)
void filter_dos(std::string &line)