• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Control characters in an NSAttributed string?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Control characters in an NSAttributed string?


  • Subject: Re: Control characters in an NSAttributed string?
  • From: Just van Rossum <email@hidden>
  • Date: Thu, 22 May 2003 21:14:29 +0200

Mark Ogilvie wrote:

> I may be mis-understanding this, but does an NSAttributed string have
> similiar controls to a regular c style string? In a c style string \n
> will be a new line, but I haven't found anything in the NSAttributed
> string documentation that mentions that, though there is a note in the
> NXText documentation that gives a hexidecimal code for a new line.
> If I create a NSAtrributed string from an NSString, are the control
> characters(tab, newline) preserved or converted and is there a way to
> access them? I was trying to write a routine to count the number of
> lines in an RFT document and I'm a bit confused.

An NSAttributedString _contains_ an NSString, so with respect to
characters there are no special rules. Eg. see
<file:///Developer/Documentation/Cocoa/Reference/Foundation/ObjC_classic
/Classes/NSString.html#//apple_ref/occ/instm/NSString/getLineStart:end:
contentsEnd:forRange:>

Just
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Control characters in an NSAttributed string? (From: Mark Ogilvie <email@hidden>)

  • Prev by Date: Re: Control characters in an NSAttributed string?
  • Next by Date: Re: objectForKey crashes for string formats
  • Previous by thread: Re: Control characters in an NSAttributed string?
  • Next by thread: Re: NSTableView - howto implement textShouldBeginEditing:
  • Index(es):
    • Date
    • Thread