NSMutableDictionary(FunkyUtilities)
@interface NSMutableDictionary <KeyType, ObjectType>
(FunkyUtilities) @end
This extension provides simple and easy to use functional and general utilities for NSMutableDictionary.
If you need to prefix the extension methods in this category, you should import NSDictionary+FunkyPrefixedUtilities.h
, where every utility method is prefixed with the funky_
keyword for compatiblitiy reasons.
See
Prefixed counterpartNSMutableDictionary(FunkyPrefixedUtilities)
See
Immutable counterpartNSDictionary(FunkyUtilities)
-
Concatenates the current dictionary (in place) with the one given in the parameter. It does this by putting the existing elements first, and the elements in the provided dictionary afterwards.
See
Immutable counterpart-[NSDictionary(FunkyUtilities) merged:]
See
Prefixed counterpart-[NSMutableDictionary(FunkyPrefixedUtilities) funky_merge:]
Declaration
Objective-C
- (void)merge:(NSDictionary<KeyType, ObjectType> *)dictionary;
Swift
func merge(_ dictionary: [AnyHashable : Any]!)
Parameters
dictionary
The other dictionary to merge with
-
Filters the dictionary (in palce) using the given predicate, keeping the elements that are passing the test.
See
Immutable counterpart-[NSDictionary(FunkyUtilities) filtered:]
See
Prefixed counterpart-[NSMutableDictionary(FunkyPrefixedUtilities) funky_filter:]
Declaration
Objective-C
- (void)filter:(BOOL (^)(KeyType, ObjectType))block;
Swift
func filter(_ block: ((Any?, Any?) -> Bool)!)
Parameters
block
The predicate used to filter the results.