Re: Trimming certain patterns from NSString?
Re: Trimming certain patterns from NSString?
- Subject: Re: Trimming certain patterns from NSString?
- From: Vincent <email@hidden>
- Date: Mon, 18 Jul 2011 19:54:53 +0200
Le 18 juil. 2011 à 19:46, Eric E. Dolecki a écrit :
> I am collecting track information (titles) and I would like to trim off
> certain things
>
> 01 - Barracuda
> becomes Barracuda
>
> 02 - Love Alive
> becomes Love Alive
If your prefix is always "XX - " then you can use -[title substringFromIndex:5];. Or you can divide your string in two parts, before and after the dash that way: [[title componentsSeparatedByString:@" - "] objectAtIndex:1];
Vincent_______________________________________________
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