Text this: A Generalization of the Krätzel Function and Its Applications