Re: Remove '\n' char from NSString
Re: Remove '\n' char from NSString
- Subject: Re: Remove '\n' char from NSString
- From: Douglas Davidson <email@hidden>
- Date: Mon, 17 Nov 2008 08:43:11 -0800
On Nov 15, 2008, at 5:41 PM, Steven Riggs wrote:
Something like [string stringByReplacingOccurrencesOfString:@"\n"
withString:@" "] should do the trick
Yes, or the mutable equivalent, provided that your line terminators
are specified to be precisely '\n'. If you wish to deal with line
terminators more generally, you can use e.g. -
getParagraphStart:end:contentsEnd:forRange: in a little loop.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden