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

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift