cpp-common
Common macros and functions for C++

Usage

Clone (as a submodule or otherwise):

git submodule add git@github.com:nvsl/cpp-common.git vendor/cpp-common

Add the directory as a include directory:

g++ -iquote"vendor/cpp-common/include" main.cc -o main

Use the files in your project:

#include "nvsl/string.hh"
#include <iostream>
int main() {
for (const auto tok : split("Hello! World.", " ")) {
std::cout << tok << std::endl;
}
}

Prints:

Hello!
World

Available files

Supported operations

Docs available at https://nvsl.github.io/cpp-common/docs/html/.

nvsl::split
auto 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.
Definition: string.hh:17
string.hh
Usefult string functions. Mostly resemble python's.