Error : Binary operator '>=' cannot be applied to operands of type 'String.Index?' and 'Int' in swift
Solution:
To find the index of substring in a string in a particular index.Here we had an example with "t" string is in 0th position.
Code:
To find the index of substring in a string in a particular index.Here we had an example with "t" string is in 0th position.
Code:
let str = request.url?.absoluteString
if str?.startIndex.distance(to:str?.index(of: "t")) != 0 {
}
Comments
Post a Comment