utils: Improve and expose string functions.