Dictionary
extension Dictionary where Key == String, Value == Any
-
Accesses the value associated with a given key, forcefully casts it to this function’s return value and returns it.
Declaration
Swift
public func value<T>(_ key: String) -> T?Parameters
keyA key for the value.
Return Value
The value cast to T, or
nilif nothing is mapped againstkey. -
Undocumented
Declaration
Swift
public func intOrNil(_ key: String) -> Int? -
Undocumented
Declaration
Swift
public func boolOrNil(_ key: String) -> Bool? -
Undocumented
Declaration
Swift
public func stringOrNil(_ key: String) -> String? -
Undocumented
Declaration
Swift
public func floatOrNil(_ key: String) -> Float? -
Undocumented
Declaration
Swift
public func uintOrNil(_ key: String) -> UInt? -
Undocumented
Declaration
Swift
public func uint32OrNil(_ key: String) -> UInt32? -
Undocumented
Declaration
Swift
public func uint64OrNil(_ key: String) -> UInt64? -
Undocumented
Declaration
Swift
public func numberOrNil(_ key: String) -> NSNumber? -
Undocumented
Declaration
Swift
public func dictionaryOrNil(_ key: String) -> [String : Any]? -
Undocumented
Declaration
Swift
public func int(_ key: String) -> Int -
Undocumented
Declaration
Swift
public func bool(_ key: String) -> Bool -
Undocumented
Declaration
Swift
public func string(_ key: String) -> String -
Undocumented
Declaration
Swift
public func float(_ key: String) -> Float -
Undocumented
Declaration
Swift
public func uint(_ key: String) -> UInt -
Undocumented
Declaration
Swift
public func uint32(_ key: String) -> UInt32 -
Undocumented
Declaration
Swift
public func uint64(_ key: String) -> UInt64 -
Undocumented
Declaration
Swift
public func number(_ key: String) -> NSNumber -
Undocumented
Declaration
Swift
public func dictionary(_ key: String) -> [String : Any]
View on GitHub
Dictionary Extension Reference