|
OpenEnroth 9cf7432
|
#include <Split.h>
Public Member Functions | |
| SplitView () | |
| SplitView (std::string_view s, char sep) | |
| auto | begin () const |
| auto | end () const |
| std::string_view | string () const |
| char | separator () const |
| template<class Container > requires std::is_same_v<std::remove_cv_t<typename Container::value_type::value_type>, char> | |
| operator Container () const | |
Private Attributes | |
| const char * | _begin = nullptr |
| const char * | _end = nullptr |
| char | _sep = '\0' |
We use C++ and this is why we can't have nice things. It's 2024, we still can't split a string w/o jumping through hoops. Just look at this: https://cplusplus.github.io/LWG/issue4017. One option is to use std::views::drop in a hacky way to fix this. But then we run into the fact that std::views::split isn't even implemented in AppleClang 14...
So here is our own implementation. More user-friendly, and more efficient.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |