0

How do I fix these two lines of code in Swift 4?

let first = String(characters.prefix(1)).capitalized
let other = String(characters.dropFirst())

Apparently using 'characters' is deprecated....

The official warning:

'characters' is deprecated: Please use String or Substring directly

Noah Schmidt
  • 171
  • 1
  • 2
  • 6

0 Answers0