I think this function can go to some general `string`-like utility.