Hi,
If you want to split a string between a symbol like, ‘.’ or ‘-‘ or ‘,’ in Objective C, what to do?
See the code for how to split string in Objective C.

NSString *myString = @”song.mp3”;
NSArray *splitArray = [myString componentsSeparatedByString:@”.”];

This code will split the string ‘myString’ into ‘song’ & ‘mp3’ (separated by ‘.’) and stores in the splitArray indices 0 & 1 respectively.
πŸ™‚

 

One Comment

  1. Julius June 14, 2011 at 2:16 pm

    thanks. it very help me πŸ™‚

     

Leave a Reply

Your email address will not be published. Required fields are marked *

 

 

 

Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.