endocrimes/Latch

Add convenience accessors around fetching Strings

Closed this issue · 3 comments

Add convenience accessors around fetching Strings

If it helps I'm using the following:

extension Latch {
    func stringValueForKey(key: String) -> String? {
        guard let data = dataForKey(key) else { return nil }
        return NSString(data: data, encoding: NSUTF8StringEncoding) as? String
    }
}

@lukeredpath It'd be super great if you could file a PR & Test for that! 😄

Added in 5b9dc7e