Add convenience accessors around fetching Strings
Closed this issue · 3 comments
endocrimes commented
Add convenience accessors around fetching Strings
lukeredpath commented
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
}
}
endocrimes commented
@lukeredpath It'd be super great if you could file a PR & Test for that! 😄
endocrimes commented
Added in 5b9dc7e