Fixed #5805: add a utility of string

add a utility of string