RSTools 3.1.0
Versatile C++20 utility library
Loading...
Searching...
No Matches
Split.hpp File Reference
#include <string>
#include <string_view>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  RST
 Root namespace of RSTools.
 
namespace  RST::String
 String helpers: case, trimming, splitting, joining, replacing, parsing and hashing.
 

Functions

Splitting

Every character of delimiters separates two parts, and empty parts are skipped.

std::vector< std::string > RST::String::splitString (std::string_view str, std::string_view delimiters)
 Splits str into strings.
 
std::vector< std::string_view > RST::String::splitStringView (std::string_view str, std::string_view delimiters)
 Splits str into views, without copying: str must outlive them.
 
std::vector< std::string > RST::String::splitStringWithQuotes (std::string_view str, std::string_view delimiters, char quote='\"')
 Splits str, keeping the delimiters found between two quote characters and removing the quotes.