NSRange, NSRangePointer

Dok-tips for NSRange

It is NOT an object, it is a c-structure

typedef struct {
  NSUInteger location; // starting location in a string
  NSUInteger length;
} NSRange;

Must remember to check for location value of NSNotFound

Other C functions related to this structure:

NSRangePointer is just an NSRange * and only used for passing out info. Never pass c-structs into a method with a pointer. C-structs are always passed by value on the stack in Objective-C

Other C functions related to this structure:

NSEqualRanges( )
NSMakeRange( ), ...

List of all Foundation Structure etc.