• 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: Trimming certain patterns from NSString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Trimming certain patterns from NSString? (From: "Eric E. Dolecki" <email@hidden>)

  • Prev by Date: Re: Trimming certain patterns from NSString?
  • Next by Date: Re: Trimming certain patterns from NSString?
  • Previous by thread: Re: Trimming certain patterns from NSString?
  • Next by thread: UIButton on top of other objects
  • Index(es):
    • Date
    • Thread