Skip to content

Instantly share code, notes, and snippets.

View kharrison's full-sized avatar
💭
Watching WWDC videos

Keith Harrison kharrison

💭
Watching WWDC videos
View GitHub Profile
@kharrison
kharrison / String.swift
Last active January 22, 2024 14:03
Swift String Playground Examples
// Swift Standard Librray - String
// Keith Harrison http://useyourloaf.com
// Import Foundation if you want to bridge to NSString
import Foundation
// ====
// Initializing a String
// ====
@kharrison
kharrison / Protocol.swift
Created January 21, 2019 11:06
Refactoring Examples in Swift
// 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
}