Utility functions for dealing with text
