#include <cassert>
#include <utility>
#include <string>
#include <type_traits>
#include <algorithm>
#include <vector>
#include <ranges>
|
| std::vector< char * > | tokenize (char *input, const char separator) |
| |
| auto | split (std::string_view s, char sep) |
| |
| auto | split (const char *s, char sep) |
| |
| void | split (std::string &&s, char sep)=delete |
| |
| void | split (std::string_view s, char sep, std::vector< std::string_view > *result) |
| |
◆ split() [1/4]
| auto split |
( |
const char * |
s, |
|
|
char |
sep |
|
) |
| |
|
inline |
◆ split() [2/4]
| void split |
( |
std::string && |
s, |
|
|
char |
sep |
|
) |
| |
|
delete |
◆ split() [3/4]
| auto split |
( |
std::string_view |
s, |
|
|
char |
sep |
|
) |
| |
|
inline |
Splits the provided string s using separator sep, returning a range of std::string_view chunks.
This function doesn't discard empty chunks, so the returned range will never be empty. Splitting an empty string will produce a single empty chunk.
- Parameters
-
| s | String to split. |
| sep | Separator character. |
◆ split() [4/4]
| void split |
( |
std::string_view |
s, |
|
|
char |
sep, |
|
|
std::vector< std::string_view > * |
result |
|
) |
| |
◆ tokenize()
| std::vector< char * > tokenize |
( |
char * |
input, |
|
|
const char |
separator |
|
) |
| |