| 14 | |
| 15 | namespace { |
| 16 | struct is_separator { |
| 17 | const std::string* separators; |
| 18 | |
| 19 | is_separator(const std::string* seps) : separators(seps) {} |
| 20 | |
| 21 | bool operator()(std::string::value_type chr) const |
| 22 | { |
| 23 | for (std::string::const_iterator it = separators->begin(), end = separators->end(); it != end; |
| 24 | ++it) { |
| 25 | if (chr == *it) |
| 26 | return true; |
| 27 | } |
| 28 | return false; |
| 29 | } |
| 30 | }; |
| 31 | |
| 32 | struct is_separator_view { |
| 33 | const std::string_view* separators; |