$darkmode
string.cpp File Reference
#include <string>
#include <string_view>
#include <vector>
Include dependency graph for string.cpp:

Functions

std::string fable::join_vector (const std::vector< std::string > &v, std::string_view sep)
 
std::vector< std::string > fable::split_string (std::string_view s)
 
std::vector< std::string > fable::split_string (std::string_view s, std::string_view sep)
 

Detailed Description

Function Documentation

◆ split_string()

std::vector< std::string > fable::split_string ( std::string_view  s,
std::string_view  sep 
)

Split string into vector by a separator.

  • The separator is stripped from the output.
  • Multiple separators result in empty strings.
  • An empty separator results in a vector of individual characters.
Parameters
sinput string view
sepseparator to split by