title: Get string-length for a given font and rect
body: <p>I have a custom <code>UIView</code> class, and in the <code>- (void)drawRect:(CGRect)rect</code> I want to draw some text. However I want the text block to be limited to a maximum width of 84px at a system font size of 12. If the text exceeds this width, I want to cut it and make the last 3 character to be "...".</p>
  
  <p>Example:</p>
  
  <pre><code>"This is some text"    // length okay
  "Information co..."    // length truncated
  </code></pre>
  
  <p>I know that I can calculate the width of a string with a given font through <code>NSString</code>'s <code>- (CGSize)sizeWithFont:(UIFont *)font</code>, but how can I get the maximum string length for 84px width?</p>