Bug fix and added StringBuffer utility methods.

* Bug Fix.
* Added 'replace', 'setCharAt', 'substring' methods.