• 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
String Character Replacement
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

String Character Replacement


  • Subject: String Character Replacement
  • From: email@hidden
  • Date: Fri, 10 Nov 2006 20:12:34 EST

What would be the most efficient way to replace characters in a string? Say I
have an NSString/NSMutableString that contains...

Joe:Smith:MI:123:456:8967:M

..and I want to replace all the colons with tabs? I suppose that I could
break each field into a substring and then recombine them, but that seems like way
too many steps for such a simple task. I need something like...

[myMutString replaceCharacter:':' with:'\t'];

Looking through the documentation of NSMutableString and NSString I didn't
find anything similar.

Thanks in advance
 _______________________________________________
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

  • Follow-Ups:
    • Re: String Character Replacement
      • From: "stephen joseph butler" <email@hidden>
    • Re: String Character Replacement
      • From: "Julio Cesar Silva dos Santos" <email@hidden>
    • Re: String Character Replacement
      • From: "Philip Q" <email@hidden>
  • Prev by Date: Leopard question
  • Next by Date: Re: String Character Replacement
  • Previous by thread: Leopard question
  • Next by thread: Re: String Character Replacement
  • Index(es):
    • Date
    • Thread