How to capitalize each word in a string using Swift iOS

Are you looking for capitalized

Discussion
A string with the first character in each word changed to its corresponding uppercase value, and all remaining characters set to their corresponding lowercase values.

and/or capitalized(with locale:) (see also: localizedCapitalized)

Returns a capitalized representation of the receiver using the specified locale.

For strings presented to users, pass the current locale (Locale.current). To use the system locale, pass nil.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)