How to divide a string with a point?

advertisements

I have an NSString string = @"abce20aa.fasgfh458sfs456456";

How can I take abce20aa only into another string?


See componentsSeparatedByString:

[[string componentsSeparatedByString:@"."] objectAtIndex:0]