title: How do I store an NSRange in a NSMutableArray or other container?
body: <p>Here's what I want to do:</p>
  
  <pre><code>NSRange r = NSMakeRange(0,5);
  id a = [NSMutableArray a];
  [a addObject: r]; // but NSRange is not a NSObject *
  </code></pre>
  
  <p>With a boolean, I'd use code like this:</p>
  
  <pre><code>[a addObject: [NSNumber numberWithBool: YES]];
  </code></pre>
  
  <p>or with an integer:</p>
  
  <pre><code>[a addObject: [NSNumber numberWithInteger: 3]];
  </code></pre>
  
  <p>So what's the equivalent with a <code>NSRange</code>? What I don't really want to do is create my own subclass of <code>NSObject</code> to accomplish this. Surely there's a way with what Apple's already provided?</p>