I'm trying to grab everything after # on a string, so for this string:
A B C #123 456
I want to get 123 456.
I have "line" defined as String, and then I issue this:
What should I do next? I can't understand the documentation very well, quite confusing. It has that rangeOfString returns NSRange, but in reality, it returns Range.
This doesn't work:
This is the documentation I'm looking at, am I looking at the wrong place?
A B C #123 456
I want to get 123 456.
I have "line" defined as String, and then I issue this:
Code:
let cmtRange: Range = line.rangeOfString("#")!
What should I do next? I can't understand the documentation very well, quite confusing. It has that rangeOfString returns NSRange, but in reality, it returns Range.
This doesn't work:
Code:
if(cmtRange.startIndex != NSNotFound) { ... }
This is the documentation I'm looking at, am I looking at the wrong place?