• 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
componentsSeparatedByString:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

componentsSeparatedByString:


  • Subject: componentsSeparatedByString:
  • From: Ambroise Confetti <email@hidden>
  • Date: Wed, 29 Oct 2003 16:40:39 +0100

Hi,

I'm putting some items of the array returned by -[NSString
componentsSeparatedByString:] into another array to read them back
later. However, after having used these NSStrings a couple of times,
they become empty (they are still valid NSString objects, but empty
strings). If I inspect them, it appears that they are instances of
NSBigMutableString (which I guess is part of the NSMutableString class
cluster). I don't use mutable strings in that part of my application,
so I can't be the one altering their content. I tried to -[copy] them
before putting them in my array, and it solved the problem.
My deduction: the strings returned by -[NSString
componentsSeparatedByString:] are mutable strings (strange, but
alright) which are somehow modified later (for some definition of
later...), and *not by me*.
Has anyone ever experienced that? It looks like it only happens if
-[NSString componentsSeparatedByString:] returns a singleton.


Ambroise

http://www.cellulo.info/
ICQ 4508259
AIM atvaark

[demime 0.98b removed an attachment of type text/directory which had a name of Ambroise Confetti.vcf]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • NSComboBoxCell ugliness
      • From: Moray Taylor <email@hidden>
    • RE: componentsSeparatedByString:
      • From: "Jonathan E. Jackel" <email@hidden>
  • Prev by Date: Importing into Xcode
  • Next by Date: Re: test if a pointer is pointing to a valid object or not?
  • Previous by thread: Re: Importing into Xcode
  • Next by thread: RE: componentsSeparatedByString:
  • Index(es):
    • Date
    • Thread