CharsPerLine utility example, based on Roman Nurik code.