Complete the implementation of String. Add all the test cases for String.