无法使用类型为(Range <String.Index>)的参数列表来调用Range <String.Index>类型的初始化程序

时间:2019-09-23 08:46:21

标签: ios swift

let result : ComparisonResult = platform.compare("iPhone", options: NSString.CompareOptions(), range: Range<String.Index>(platform.startIndex ..< platform.index(platform.startIndex, offsetBy: 6)), locale: Locale.current)

错误

  

无法使用类型为((Range)''的参数列表来调用类型为'Range'的初始化程序

0 个答案:

没有答案