• 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: Replace characters in a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replace characters in a string


  • Subject: Re: Replace characters in a string
  • From: John Pannell <email@hidden>
  • Date: Sun, 1 Oct 2006 08:17:41 -0600

Hi Carl-

If you are producing a URL, I would suggest using NSString's stringByReplacingPercentEscapesUsingEncoding: method; it will take can of any illegal characters for a URL, including the spaces.

HTH!

John

On Oct 1, 2006, at 8:01 AM, Carl Johan Foss wrote:

Hi,

I was wondering if anybody can help me figure out how I can replace white spaces and possibly carriage return in a string that I have from an NSTextView. I need the white spaces to be replaced by "+". In the end it will actually be a URL string.

I was looking at NSMutableString but got stuck.

Any help highly appreciated.

Thanks in advance
Carl


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40positivespinmedia.com


This email sent to email@hidden

_______________________________________________ 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: Replace characters in a string
      • From: Mike Abdullah <email@hidden>
References: 
 >Replace characters in a string (From: Carl Johan Foss <email@hidden>)

  • Prev by Date: Replace characters in a string
  • Next by Date: Re: Replace characters in a string
  • Previous by thread: Replace characters in a string
  • Next by thread: Re: Replace characters in a string
  • Index(es):
    • Date
    • Thread