title: How do I remove leading & trailing whitespace of NSString inside an NSArray?
body: <p>I have an NSArray declared as such:</p>
  
  <pre><code>@property (nonatomic, strong) NSArray *arrayRefineSubjectCode;
  </code></pre>
  
  <p>I have the array elements manually filled out as below:</p>
  
  <pre><code>     arrayRefineSubjectCode = [NSArray arrayWithObjects:
                                @"  BKKC 2061",
                                @"   BKKS 2631   ",
                                @"BKKS 2381      ",
                                nil];
  </code></pre>
  
  <p>So how do I remove starting and ending whitespace and make each array elements to become as these:</p>
  
  <pre><code>     arrayRefineSubjectCode = [NSArray arrayWithObjects:
                                @"BKKC 2061",
                                @"BKKS 2631",
                                @"BKKS 2381",
                                nil];
  </code></pre>
  
  <p>I have tried using "stringByTrimmingCharactersInSet:" but it only works for NSString. Kinda confused here. Please help...</p>