move some string function to string-util.c