Implmented the trim method in String class. This change closes #4.

This solution augments the String class by implementing the trim method if it is not implemented yet.