rewrote most of String class to more closely follow the STL string