OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
Split.h File Reference
#include <cassert>
#include <utility>
#include <string>
#include <type_traits>
#include <algorithm>
#include <vector>

Classes

class  detail::SplitViewSentinel
 
class  detail::SplitViewIterator
 
class  detail::SplitView
 

Namespaces

namespace  detail
 

Functions

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)
 

Function Documentation

◆ 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
sString to split.
sepSeparator 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 
)