common: Add some string operation functions