title: Categories for NSMutableString and NSString causing binding confusion?
body: <p>I have extended both NSString and NSMutableString with some convenience methods using categories. These added methods have the same name, but have different implementations.  For e.g., I have implemented the ruby "strip" function that removes space characters at the endpoints for both but for NSString it returns a new string, and for NSMutableString it uses the "deleteCharactersInRange" to strip the existing string and return it (like the ruby strip!).  </p>
  
  <p>Here's the typical header:</p>
  
  <pre><code>@interface NSString (Extensions)
  -(NSString *)strip;
  @end
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@interface NSMutableString (Extensions)
  -(void)strip;
  @end
  </code></pre>
  
  <p>The problem is that when I declare NSString *s and run [s strip], it tries to run the NSMutableString version and raises an extension.</p>
  
  <pre><code>NSString *s = @"   This is a simple string    ";
  NSLog([s strip]);
  </code></pre>
  
  <p>fails with:</p>
  
  <blockquote>
    <p>Terminating app due to uncaught
    exception
    'NSInvalidArgumentException', reason:
    'Attempt to mutate immutable object
    with deleteCharactersInRange:'</p>
  </blockquote>