Xcode 7b5 Swift Strings
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