Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
Re: Removing empty lines from NSMutableString
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Re: Removing empty lines from NSMutableString
Subject
:
Re: Removing empty lines from NSMutableString
From: "M. Uli Kusterer" <
email@hidden
>
Date: Mon, 27 Jun 2005 18:00:49 +0200
At 16:42 Uhr +0100 27.06.2005, Neil Williams wrote:
Is there a simple and elegant way to delete empty lines from an NSMutableString?
Use the replace methods? Two to normalize the line breaks (\r\n -> \n and \r -> \n), and then replace any occurrence of \n\n with \n repeatedly until you get no more replaces. Finally check for leading or trailing \n character and remove that (You could also use one of the "trim" methods for that).
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References:
>
Removing empty lines from NSMutableString
(From: Neil Williams <email@hidden>)
Prev by Date:
Re: Not drawing NSTableView rows as selected?
Next by Date:
Is Cocoa incompatible with 64-bit?
Previous by thread:
Removing empty lines from NSMutableString
Next by thread:
CoreData auto-complete bindings?
Index(es):
Date
Thread