Implement StringBuilder.setLength

Could you adapt the error message to the java one? ("String index out of range: -1")