Skip to content

Instantly share code, notes, and snippets.

View moshegutman's full-sized avatar

Moshe Gutman moshegutman

View GitHub Profile
@moshegutman
moshegutman / UppercaseFormatter.swift
Last active November 19, 2017 21:39
An NSFormatter subclass written in Swift for converting strings to uppercase.
import Foundation
class UppercaseFormatter : Formatter {
override func string(for obj: Any?) -> String? {
if let stringValue = obj as? String {
return stringValue.uppercased()
}
return nil
}