componentsSeparatedByString:
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.