Collection Classes and String Split Function

Discussion in 'iPhone/iPad Programming' started by teguh123, Mar 31, 2011.

  1. macrumors member

    Joined:
    Mar 22, 2011
    #1
    Does objective C has collection class? Is it NSArray?

    Is there a way to split string by some character, say * and get an array?

    I want to be able to "sort" that collection. Perhaps by using some form of lambda expression.
     
  2. macrumors 68040

    Joined:
    Apr 22, 2005
    #2
    Since you are asking about an operation on a string, I suggest you look at the documentation for NSString.
     
  3. macrumors 603

    Joined:
    Aug 9, 2009
    #3
    This is the third time I've posted this information, in replies to your questions.

    See this reply on your other thread:
    http://forums.macrumors.com/showthread.php?p=12261166&highlight=#post12261166

    The Collections Programming Topics link has as its first section "Arrays: Ordered Collections". That has a sub-section "Sorting Arrays".
    http://developer.apple.com/library/...ys.html#//apple_ref/doc/uid/20000132-BBCCJBIF

    I suggest you read the entire Collections Programmings Topics document, and then look at the second link, which lists all the classes in the Foundation framework.
     
  4. macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    Yes, all those things are do-able. Look at these guides:

    Collections Programming Topics Guide
    String Programming Guide for Core Foundation
    Sort Descriptor Programming Topics
     
  5. macrumors 603

    Joined:
    Aug 9, 2009
    #5

Share This Page