implementation of cpp class string