mirror of
https://github.com/anope/anope.git
synced 2026-06-25 15:46:37 +02:00
Fix a few things that bugged me when I was working on one of my own modules.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2573 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -112,6 +112,16 @@ sepstream::sepstream(const std::string &source, char seperator) : tokens(source)
|
||||
last_starting_position = n = tokens.begin();
|
||||
}
|
||||
|
||||
sepstream::sepstream(const ci::string &source, char seperator) : tokens(source.c_str()), sep(seperator)
|
||||
{
|
||||
last_starting_position = n = tokens.begin();
|
||||
}
|
||||
|
||||
sepstream::sepstream(const char *source, char seperator) : tokens(source), sep(seperator)
|
||||
{
|
||||
last_starting_position = n = tokens.begin();
|
||||
}
|
||||
|
||||
bool sepstream::GetToken(std::string &token)
|
||||
{
|
||||
std::string::iterator lsp = last_starting_position;
|
||||
@@ -138,6 +148,14 @@ bool sepstream::GetToken(std::string &token)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool sepstream::GetToken(ci::string &token)
|
||||
{
|
||||
std::string tmp_token;
|
||||
bool result = GetToken(tmp_token);
|
||||
token = tmp_token.c_str();
|
||||
return result;
|
||||
}
|
||||
|
||||
const std::string sepstream::GetRemaining()
|
||||
{
|
||||
return std::string(n, tokens.end());
|
||||
|
||||
Reference in New Issue
Block a user