I have an html string, and I want to allow 1 linebreak at a time. I am trying to replacing all "\n\n" with "\n". But at the end I end up with double line-breaks.
Is it possible to print the content of a string to see what the content is, so instead of going to a new line display "\n" in the output window.
while ((range = [html rangeOfString:@"\n\n"]).length)
{
[html replaceCharactersInRange:range withString:@"\n"];
}
EDIT: html has been converted to plain text (so there are no BR tags in the string)