Created
September 14, 2015 20:16
-
-
Save romainmenke/c14e9d4edd190e3f3f92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var range = baseString.rangeOfString("Hello") | |
// wrap in while loop with .containsString() | |
var ranges : [NSRange] = [] | |
while baseString.containsString("Hello") { | |
let nsRange = baseString.rangeOfString("Hello") | |
ranges.append(nsRange) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment