diff options
author | Yuri Gorshenin <y@maps.me> | 2016-06-22 00:10:23 +0300 |
---|---|---|
committer | Yuri Gorshenin <y@maps.me> | 2016-06-22 00:10:23 +0300 |
commit | 3dcca2c16d45bd7e45fc8a8c6d4e519015d5acc7 (patch) | |
tree | 343863a671cbeb6d2eaeafbbee8912d84578b620 /base/string_utils.cpp | |
parent | 62f35230b410717dc2a3c286a6cf208ff8fbab1f (diff) |
[base] Removed TokenizeIterator default ctor.
Diffstat (limited to 'base/string_utils.cpp')
-rw-r--r-- | base/string_utils.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/base/string_utils.cpp b/base/string_utils.cpp index d36b33a853..7b6b808995 100644 --- a/base/string_utils.cpp +++ b/base/string_utils.cpp @@ -24,12 +24,14 @@ SimpleDelimiter::SimpleDelimiter(char const * delims) m_delims.push_back(utf8::unchecked::next(it)); } +SimpleDelimiter::SimpleDelimiter(char delim) +{ + m_delims.push_back(delim); +} + bool SimpleDelimiter::operator()(UniChar c) const { - for (UniString::const_iterator it = m_delims.begin(); it != m_delims.end(); ++it) - if (*it == c) - return true; - return false; + return find(m_delims.begin(), m_delims.end(), c) != m_delims.end(); } UniChar LastUniChar(string const & s) |