move some function to stringutil