Code Cleanup

- Removed obsolete text.cpp splitq funciton, which is superceded by
  Lexer::split.
This commit is contained in:
Paul Beckingham 2014-04-24 09:35:02 -04:00
parent b0b176827e
commit d99f40eaad
3 changed files with 1 additions and 54 deletions

View file

@ -61,47 +61,6 @@ void wrapText (
lines.push_back (line);
}
////////////////////////////////////////////////////////////////////////////////
// UTF-8
void splitq (
std::vector<std::string>& results,
const std::string& input,
const char delimiter)
{
results.clear ();
std::string::size_type start = 0;
std::string::size_type i = 0;
std::string word;
bool in_quote = false;
char quote;
while (utf8_next_char (input, i))
{
if (in_quote)
{
if (input[i] == quote)
in_quote = false;
}
else
{
if (input[i] == delimiter)
{
results.push_back (unquoteText (input.substr (start, i - start)));
start = i + 1;
}
else if (input[i] == '\'' ||
input[i] == '"')
{
quote = input[i];
in_quote = true;
}
}
}
results.push_back (unquoteText (input.substr (start)));
}
////////////////////////////////////////////////////////////////////////////////
void split (
std::vector<std::string>& results,