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.
In swift 4 the below code is used for capitalise the first letter.
String(characters.prefix(1)).
In swift 5 below code is used for capitalise the first letter.
let first = String(prefix(1)).capitalized
Comments
Post a Comment