i have a string named url i.e
NSString *url = @"http://sound17.mp3pk.com/indian/barfi/%5BSongs.PK%5D%20
Barfi%20-%2001%20-%20Barfi!.mp3";
Now I want that It should search from last upto the .(dot)
i.e it should search
mp3
in string as it is coming after .(dot) and want to store that mp3
in the temporary variable.
how can i use lastindex(".")
or something else to store in temporary variable.
Simple as that:
NSString *extension = [url pathExtension];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With