// -*- mode: c++; c-basic-offset: 2; -*- #include "common.hh" #include "character.hh" // static bool Character::isspace(std::string const& str, size_t pos) { switch (str[pos]) { case ' ': case '\t': case '\r': case '\n': return true; } return false; } // static bool Character::isseparator(std::string const& str, size_t pos) { if (isspace(str, pos)) return true; switch (str[pos]) { case '.': case ':': case '-': case ',': case ';': return true; } return false; }