forked from organicmaps/organicmaps
[core] String tokenizer test and notes.
This commit is contained in:
parent
237acea177
commit
ec8c07563c
3 changed files with 8 additions and 0 deletions
|
@ -295,6 +295,12 @@ UNIT_TEST(SimpleTokenizer)
|
|||
" -\xD9\x87", tokens);
|
||||
}
|
||||
|
||||
{
|
||||
char const * s[] = {"27.535536", "53.884926" , "189"};
|
||||
tokens.assign(&s[0], &s[0] + ARRAY_SIZE(s));
|
||||
TestIter("27.535536,53.884926,189", ",", tokens);
|
||||
}
|
||||
|
||||
{
|
||||
char const * s[] = {"1", "2"};
|
||||
tokens.assign(&s[0], &s[0] + ARRAY_SIZE(s));
|
||||
|
|
|
@ -79,12 +79,14 @@ class TokenizeIterator
|
|||
}
|
||||
|
||||
public:
|
||||
/// @warning string S must be not temporary!
|
||||
TokenizeIterator(string const & s, DelimFuncT const & delimFunc)
|
||||
: m_beg(s.begin()), m_end(s.begin()), m_finish(s.end()), m_delimFunc(delimFunc)
|
||||
{
|
||||
move();
|
||||
}
|
||||
|
||||
/// @warning unistring S must be not temporary!
|
||||
TokenizeIterator(UniString const & s, DelimFuncT const & delimFunc)
|
||||
: m_beg(s.begin()), m_end(s.begin()), m_finish(s.end()), m_delimFunc(delimFunc)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue