String functions in swift 5

Solution:

In swift 4 the below code is used for capitalise the first letter.

String(characters.prefix(1)).capitalized

In swift 5 below code is used for capitalise the first letter.

let first = String(prefix(1)).capitalized           

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift