title: How to split a string of words and add to an array - Objective C
body: <p>Let's say I have this:</p>
  
  <p><code>NSString *str = @"This is a sample string";</code></p>
  
  <p>How will I split the string in a way that each word will be added into a NSMutableArray?</p>
  
  <p>In VB.net you can do this:</p>
  
  <pre><code>Dim str As String
      Dim strArr() As String
      Dim count As Integer
      str = "vb.net split test"
      strArr = str.Split(" ")
      For count = 0 To strArr.Length - 1
          MsgBox(strArr(count))
      Next
  </code></pre>
  
  <p>So how to do this in Objective-C? Thanks </p>