mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-26 00:40:05 +01:00
StringTokenizer::find implementation and tests
This commit is contained in:
@@ -83,4 +83,15 @@ StringTokenizer::~StringTokenizer()
|
||||
}
|
||||
|
||||
|
||||
std::size_t StringTokenizer::find(const std::string& key, std::size_t pos) const
|
||||
{
|
||||
Iterator it = begin();
|
||||
Iterator stop = end();
|
||||
for (it += pos; it != stop; ++it)
|
||||
if (*it == key) return it - begin();
|
||||
|
||||
throw NotFoundException(key);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
Reference in New Issue
Block a user