Yeah that's one of the solutions I was thinking about too as well as just deleting all the text on the line if it's all whitespace however I wasn't sure if there was a more optimized solution.  I was hoping for something more like NSString `stringByReplacingCharactersInRange:withString:` if possible though although I haven't found anything like that yet.