stringByTrimmingCharactersInSet: problem
stringByTrimmingCharactersInSet: problem
- Subject: stringByTrimmingCharactersInSet: problem
- From: "Tony S. Wu" <email@hidden>
- Date: Mon, 6 Jan 2003 19:18:47 -0800
I don't know if this is a bug.
If I apply the NSString method stringByTrimmingCharactersInSet: with
NSCharacterSet's whitespaceCharacterSet on a one-character string, the
returned string will be blank.
For example:
NSString *original = [[NSString alloc] initWithString: @"A"];
NSString *tempString = [original stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceCharacterSet]];
The tempString will become blank.
However, if the receiver has more than 2 characters, the function works
fine.
Is this a bug?
How do i work around with it?
Thanks.
Tony S. Wu
email@hidden
"It takes a smart man to be stupid." ~Tony
_______________________________________________
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.