Some handy text processing utilities