This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Swift Standard Librray - String | |
// Keith Harrison http://useyourloaf.com | |
// Import Foundation if you want to bridge to NSString | |
import Foundation | |
// ==== | |
// Initializing a String | |
// ==== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of refactoring with protocols | |
// Original javascript version is from Refactoring (2nd Edition) by Martin Fowler | |
import Foundation | |
struct Play { | |
enum Genre { | |
case tragedy | |
case comedy | |
} |
OlderNewer