Add some string utilities and tests