Utility functions for dealing with text (kernel)
