Update String.cpp

fix bug found at brch part 5