Dictionary

struct Dictionary<Key, Value> : Collection, ExpressibleByDictionaryLiteral where Key : Hashable
  • Returns a list of keys in the dictionary that match the given value.

    Declaration

    Swift

    public func bky_allKeysForValue(_ value: Value) -> [Key]

    Return Value

    The list of keys for that value.

  • Returns any key in the dictionary that matches the given value. There is no guarantee on what key this may be, if there are multiple keys that contain the same value.

    Declaration

    Swift

    public func bky_anyKeyForValue(_ value: Value) -> Key?

    Return Value

    Any key mapped for the given value, or nil if none is found.