Utility module rather than monkey patching String

Removed the risk of clashing with other monkey patching libraries and introducing unexpected behaviour.