NSRange struct consists of two integers - location and length .
typedef struct _NSRange { NSUInteger location; NSUInteger length; } NSRange;
It appears that location and location+length are the two expressions you are looking for - ranges for left and right substrings:
NSRange prefixRange = NSMakeRange(0, myRange.location); NSUInteger pos =myRange.location+myRange.length; NSRange suffixRange = NSMakeRange(pos, myString.length - pos);
source share