adding new example for string class

Works with pull request #291.

Please review.