add class StringUtils, move the code into it