C++ functions matching the interface and behavior of python string methods
