add toArray method to String.prototype