Just trying to remove the first character from a string in Swift. I use the code written below, but the second line keeps crashing my application.
Is this not the correct way to unwrap a String Index? What is?
var tempText = text
let toRemove = tempText?.startIndex ?? String.Index(0)
tempText?.remove(at: toRemove)