• 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: Xcode 7b5 Swift Strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode 7b5 Swift Strings


  • Subject: Re: Xcode 7b5 Swift Strings
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 13 Aug 2015 20:08:59 +0000

On Aug 13, 2015, at 12:56 , Rick Mann <email@hidden> wrote:
>
> Now I have to write:
>
> let s2 = ((s as NSString).stringByExpandingTildeInPath as NSString).stringByAppendingPathComponent("foo")
>
> How is this better?

What happened is that the methods in NSPathUtilities.h are no longer available to the String type. It’s unknown whether this was an oversight, or if there’s a philosophical reason for the change. I guess we’ll find out in the next beta.

In the meantime, casting to NSString is a slight inconvenience, or you can use NSURL (though Charles Strska has pointed out that you need to be careful when appending a path extension to a NSURL).

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Xcode 7b5 Swift Strings
      • From: Charles Srstka <email@hidden>
    • Re: Xcode 7b5 Swift Strings
      • From: Rick Mann <email@hidden>
References: 
 >Xcode 7b5 Swift Strings (From: Rick Mann <email@hidden>)

  • Prev by Date: Xcode 7b5 Swift Strings
  • Next by Date: Re: Xcode 7b5 Swift Strings
  • Previous by thread: Xcode 7b5 Swift Strings
  • Next by thread: Re: Xcode 7b5 Swift Strings
  • Index(es):
    • Date
    • Thread