FROM : Jacob Engstrand
DATE : Sat Nov 23 07:59:46 2002
On lvrdag, nov 23, 2002, at 07:46 Europe/Stockholm, Ali Ozer wrote:
>> One work-around is to simply append a space to the string before
>> trimming. Like this:
>>
>> value = [value stringByAppendingString: @" "];
>> value = [value stringByTrimmingCharactersInSet: [NSCharacterSet
>> whitespaceCharacterSet]];
>>
>> Not pretty, but the good thing is this code will continue to work
>> after Apple fixes stringByTrimmingCharactersInSet:.
>
> This is indeed a bug; see
> http://developer.apple.com/qa/qa2001/qa1202.html
>
> Your workaround seems reasonable (when you want to remove characters
> from the whitespace set).
>
> Ali
>
Ah! Of course. My mind was totally set on trimming whitespace...
Thanks
/jak
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Sat Nov 23 07:59:46 2002
On lvrdag, nov 23, 2002, at 07:46 Europe/Stockholm, Ali Ozer wrote:
>> One work-around is to simply append a space to the string before
>> trimming. Like this:
>>
>> value = [value stringByAppendingString: @" "];
>> value = [value stringByTrimmingCharactersInSet: [NSCharacterSet
>> whitespaceCharacterSet]];
>>
>> Not pretty, but the good thing is this code will continue to work
>> after Apple fixes stringByTrimmingCharactersInSet:.
>
> This is indeed a bug; see
> http://developer.apple.com/qa/qa2001/qa1202.html
>
> Your workaround seems reasonable (when you want to remove characters
> from the whitespace set).
>
> Ali
>
Ah! Of course. My mind was totally set on trimming whitespace...
Thanks
/jak
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Jacob Engstrand | Nov 23, 07:09 | |
| Ali Ozer | Nov 23, 07:46 | |
| Jacob Engstrand | Nov 23, 07:59 |






Cocoa mail archive

