17 unsigned int countOpen = 0;
18 unsigned int countClosed = 0;
25 if (line[line.size() - 1] ==
']')
31 if (countOpen == countClosed)
43 throw IOException (
"NexusTools::getNextCommand(). Failed to read from stream");
55 line = line.substr(0, line.size() - 1);
57 string::size_type limit = line.find(
" ");
58 if (limit == string::npos)
70 name = line.substr(0, limit);
71 arguments = line.substr(limit + 1);
74 while (!commandComplete)
78 throw IOException (
"NexusTools::getNextCommand(). Reached end of file before the end of the command could be found");
83 line = line.substr(0, line.size() - 1);
std::string removeSurroundingWhiteSpaces(const std::string &s)
bool startsWith(const std::string &s, const std::string &pattern)
bool endsWith(const std::string &s, const std::string &pattern)
This alphabet is used to deal NumericAlphabet.