cpp-common
Functions
string.hh File Reference

Usefult string functions. Mostly resemble python's. More...

#include "nvsl/error.hh"
#include <string>
#include <vector>
Include dependency graph for string.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

auto nvsl::split (const std::string &str, const std::string &delim, size_t assert_length=UINT64_MAX)
 Split string using a delimeter into a vector of strings.
 
auto nvsl::zip (const std::vector< std::string > arr, const std::string join_str)
 Concat all the elements of a string vector into a stingle string.
 
auto nvsl::is_suffix (const std::string &suffix, const std::string &str)
 Checks if a string is suffix of another string.
 
auto nvsl::is_prefix (const std::string &prefix, const std::string &str)
 Checks if a string is prefix of another string.
 
const std::string nvsl::S (const char *c)
 
std::string nvsl::ltrim (const std::string &str)
 
std::string nvsl::rtrim (const std::string &str)
 
std::string nvsl::trim (const std::string &str)
 

Detailed Description

Usefult string functions. Mostly resemble python's.

Date
Sep 23, 2021

Definition in file string.hh.