Cannot invoke initializer for type 'Range<_>' with an argument list of type '(Range<String._CharacterView.Index>)'
wuke666 opened this issue · comments
Cannot invoke initializer for type 'Range<_>' with an argument list of type '(Range<String._CharacterView.Index>)'
let range = Range(characters.index(endIndex, offsetBy: -3) ..< endIndex) erro
I have the same problem too ,Use this code instead can be fix
let range = startIndex ..< characters.index(startIndex, offsetBy: 1)
楼上亲测有效 赞一个 不过报错的地方有四个 注意把offsetBy值改了就行.
Just remove : Range( and ending bracket )