stringByTrimmingCharactersInSet
stringByTrimmingCharactersInSet
- Subject: stringByTrimmingCharactersInSet
- From: Jacob Engstrand <email@hidden>
- Date: Fri, 22 Nov 2002 16:22:54 +0100
Hi All,
NSString *before = @"ab";
NSLog(@"before: '%@'", before);
NSString *after = [before stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceCharacterSet]];
NSLog(@"after: '%@'", after);
The above piece of code outputs:
before: 'ab'
after: 'ab'
Which is ok, of course. But changing the first line to:
NSString *before = @"a";
gives the following output:
before: 'a'
after: ''
What gives? Is it me? Am I loosing it? Or is this some bug that
everybody knows about but I?
/jak
____________________________________________________________
Buy Nothing Day: November 30, 2002 (November 29 in the USA).
The intent of the Buy Nothing Day is to provide a period of
respite and a pause for reflection from the rigors of the
consumption economy, which is the main thing that dominates
the media and perhaps a few too many of our daily life
choices and aspirations.
http://www.buynothingday.co.uk/
_______________________________________________
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.