simple pure c++ implementation of string class