Useful utilities, missing from the std lib.
Compile into a dynamic lib on macOS: c++ -dynamiclib -std=c++11 -o cpp-utils.dylib split.cpp
Include the header file:
#include "/path/to/cpp-utils.hpp"
Compile your app: c++ -Wall -std=c++11 -o myapp cpp-utils.dylib myapp.cpp
Ensure the dynamic lib is in your path e.g. your current working directory, when running your app.