str.capitalized

// Some code
import Foundation            // for str.capitalized

let str = "this is an apple"
str.capitalized    // This Is An Apple

Last updated