• 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: Mike Abdullah <email@hidden>
  • Date: Sun, 1 Oct 2006 15:29:16 +0100

if not, I suspect NSScanner is a class you'll be rather interested in.

Mike.

On 1 Oct 2006, at 15:17, John Pannell wrote:

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:
40gmail.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
References: 
 >Replace characters in a string (From: Carl Johan Foss <email@hidden>)
 >Re: Replace characters in a string (From: John Pannell <email@hidden>)

  • Prev by Date: Re: Replace characters in a string
  • Next by Date: How do I use NSTreeController?
  • Previous by thread: Re: Replace characters in a string
  • Next by thread: How do I use NSTreeController?
  • Index(es):
    • Date
    • Thread