Cannot convert value of type 'ReversedCollection' to expected argument type '[String.Element]' (aka 'Array')

后端 未结 0 340
Happy的楠姐
Happy的楠姐 2021-02-10 06:00
func test(input: String) -> Bool {
    let reversed = input.reversed()
    let inputArray = Array(input)
    
    return reversed == inputArray 
}

I

相关标签:
回答
  • 消灭零回复
提交回复
热议问题