JSONExport icon indicating copy to clipboard operation
JSONExport copied to clipboard

Cannot invoke initializer for type 'Range<_>' with an argument list of type '(Range<String._CharacterView.Index>)'

Open wuke666 opened this issue 6 years ago • 3 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

wuke666 avatar Sep 20 '18 08:09 wuke666

I have the same problem too ,Use this code instead can be fix let range = startIndex ..< characters.index(startIndex, offsetBy: 1)

shesio avatar Sep 25 '18 08:09 shesio

楼上亲测有效 赞一个 不过报错的地方有四个 注意把offsetBy值改了就行.

wanyijun avatar Nov 02 '18 08:11 wanyijun

Just remove : Range( and ending bracket )

mhmdgoma avatar Nov 13 '18 12:11 mhmdgoma