Re: lowercaseString on Jaguar
Re: lowercaseString on Jaguar
- Subject: Re: lowercaseString on Jaguar
- From: Clark Cox <email@hidden>
- Date: Fri, 11 Jun 2004 08:47:53 -0400
On Jun 11, 2004, at 06:41, Michael Becker wrote:
>
Hi!
>
>
Is there anything wrong with [NSString lowercaseString] on 10.2.x?
>
This code works flawlessly under Panther:
>
>
NSString* lpath = [ path lowercaseString];
>
if ( [ lpath hasSuffix:@".jpg"] || [ lpath hasSuffix:@".jpeg"] )
>
filenameIsJPEG = YES;
I just tested this under 10.2.8, and this code works just fine.
>
But not under Jaguar. I cannot test it myself, but people told me that
>
"images with capital endings such as .JPG won't be recognized" by my
>
application. But this works under Panther. I've read something about
>
"incorrect mappings" in this method, which have been fixed. Does
>
anybody know anything more precise?
While not related to your main question, there are already methods
used to extract components of paths (including the extension):
NSString *extension = [path pathExtension];
filenameIsJPEG = NSOrderedSame == [extension
caseInsensitiveCompare: @".jpg"] ||
NSOrderedSame == [extension
caseInsensitiveCompare: @".jpeg"];
--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://www.livejournal.com/users/clarkcox3/
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.