refactor string utility methods into StringUtils class.