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

Xcode 7b5 Swift Strings


  • Subject: Xcode 7b5 Swift Strings
  • From: Rick Mann <email@hidden>
  • Date: Thu, 13 Aug 2015 12:56:54 -0700

Between b4 and b5, Apple has changed some NSString methods in Swift. I used to be able to do this:

let s : String = ...
let s2 = s.stringByExpandingTildeInPath.stringByAppendingPathComponent("foo")

Now I have to write:

let s2 = ((s as NSString).stringByExpandingTildeInPath as NSString).stringByAppendingPathComponent("foo")

How is this better? Am I overlooking something else that makes this straightforward again (e.g. native String methods that do the same as the NSString methods)?

TIA,


--
Rick Mann
email@hidden



_______________________________________________

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: Quincey Morris <email@hidden>
  • Prev by Date: Re: Initialisation pattern
  • Next by Date: Re: Xcode 7b5 Swift Strings
  • Previous by thread: Re: What version of OpenGL bundled in El Capitan?
  • Next by thread: Re: Xcode 7b5 Swift Strings
  • Index(es):
    • Date
    • Thread