Best Way to Store a Paragraph in an Array?

Discussion in 'iOS Programming' started by jpmcgrath, Jul 20, 2011.

  1. jpmcgrath macrumors newbie

    Jul 15, 2011
    I'm throwing together an NSArray, within which I would like to add descriptions that are about a paragraph long. To my knowledge NSString is not the best way to store this information. What would you use?
  2. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Why not?
  3. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    If the intent is to store text and attributes, maybe NSAttributedString. But you didn't ask about attributes or formatting, so that's just a guess.

    If the intent is to have mutable text, maybe NSMutableString. And you didn't mention mutability or editability, so that's another guess.

    Otherwise I'm with dejo: Why not NSString? Who's been bad-mouthing the mild-mannered yet unprepossessing NSString, and where did you read these vile accusations?

Share This Page