mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-29 05:05:34 +08:00
Drop category methods in favor of C functions for required functionality to reduce API size and avoids namespace conflicts
This commit is contained in:
26
Code/Support/RKDictionaryUtilities.h
Normal file
26
Code/Support/RKDictionaryUtilities.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// RKDictionaryUtilities.h
|
||||
// RestKit
|
||||
//
|
||||
// Created by Blake Watters on 9/11/12.
|
||||
// Copyright (c) 2012 RestKit. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
Reverse merges two dictionary to produce a new dictionary wherein the keys in the second dictionary have taken precedence in instances where keys overlap. The merge is performed recursively such that subdictionaries are reverse merged as well.
|
||||
|
||||
@param dictionary The dictionary to be reverse merged.
|
||||
@param anotherDictionary A secondary dictionary to perform the reverse merging with.
|
||||
@return A new `NSDicionary` object that is the product of the reverse merge.
|
||||
*/
|
||||
NSDictionary *RKDictionaryByReverseMergingDictionaryWithDictionary(NSDictionary *dictionary, NSDictionary *anotherDictionary);
|
||||
|
||||
/**
|
||||
Return a new dictionary by stripping out any percent escapes (such as %20) from the given dictionary's key and values.
|
||||
|
||||
@param dictionary The dictionary from which to remove the percent escape sequences.
|
||||
@return A new `NSDictionary` wherein any percent escape sequences in the key and values have been replaced with their literal values.
|
||||
*/
|
||||
NSDictionary *RKDictionaryByReplacingPercentEscapesInEntriesFromDictionary(NSDictionary *dictionary);
|
||||
Reference in New Issue
Block a user