Coding, Swift

Swift 2.0 substringWithRange

Ah finally solved. This was so much drama for a small thing to do.


I have a string; SINCGKXXXYY . [Say these are 2 airport destinations + some junk text and i want to separate the airports out of the string in the easiest possible way!]


Use the following extension:

Once done you can use it using this