I was reading \"The Swift Programming Language Swift 4.2\" and in \"Strings and Characters\" chapter under \"Substrings\" section, the following code is given as an example:
You can try index(of
index(of
let index = greeting.index(of: ",") ?? greeting.endIndex
as firstIndex exists in Xcode 10 beta Doc
firstIndex