trimBlanks trims '\n' and '\r' as well.