gokhancokkececi gokhancokkececi - 4 months ago 12
Swift Question

How do you get the last character of a string without using array on swift?

I got a string

let stringPlusString = TextBoxCal.text


I want to get last character of
stringPlusString
i do not want to use array on java exist
charAt
but i can not find like this keyword on swift

Answer

For Swift 2.x and Swift 3:

let str = "hello world