Test: added doctests to string utility methods.