• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: lowercaseString on Jaguar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >lowercaseString on Jaguar (From: Michael Becker <email@hidden>)

  • Prev by Date: Coloring a table row?
  • Next by Date: Re: Coloring a table row?
  • Previous by thread: lowercaseString on Jaguar
  • Next by thread: Re: lowercaseString on Jaguar
  • Index(es):
    • Date
    • Thread