Nimbus
0.9.3 - Nimbus is proudly hosted on Github
An iOS framework whose growth is bounded by O(documentation).
|
For testing whether a collection is of a certain type and is non-empty.
Simply calling -count on an object may not yield the expected results when enumerating it if certain assumptions are also made about the object's type. For example, if a JSON response returns a dictionary when you expected an array, casting the result to an NSArray and calling count will yield a positive value, but objectAtIndex: will crash the application. These methods provide a safer check for non-emptiness of collections.
Functions | |
BOOL | NIIsArrayWithObjects (id object) |
BOOL | NIIsSetWithObjects (id object) |
BOOL | NIIsStringWithAnyText (id object) |
NIIsArrayWithObjects | ( | id | object | ) |
Tests if an object is a non-nil array which is not empty.
Definition at line 23 of file NINonEmptyCollectionTesting.m.
BOOL NIIsSetWithObjects | ( | id | object | ) |
Tests if an object is a non-nil set which is not empty.
Definition at line 29 of file NINonEmptyCollectionTesting.m.
BOOL NIIsStringWithAnyText | ( | id | object | ) |
Tests if an object is a non-nil string which is not empty.
Definition at line 35 of file NINonEmptyCollectionTesting.m.