added some string utility functions