I need to do something that seems simple but I can't figure out the right syntax.
Given a string, I need to search for the first occurrence of a substring (not a character). If found, I need to create a new string by removing the part of the old string that is before the substring.
I can't see how this is done in Swift. There is a "firstIndexOf" function, but it only searches for one character at a time.
I also know that there is a "range(of:)" function, but I can't find its documentation, and I don't know what the return type is, or how I would use it.
Thanks, Frank