Some string utilities for the tests.
Update the tests to use them.