Java like functions for the String Library in C++