46 const std::string& str,
47 const std::string& ignore,
48 const std::string& comment
51 size_t comment_pos = str.find_first_of( comment );
52 return str.npos != comment_pos && comment_pos == str.find_first_not_of( ignore );
bool iscomment(const std::string &str, const std::string &ignore=" \t", const std::string &comment="#")
determine if the string is a comment.