Capitalize First Letter

How to capitalize the first letter of a word.

Overview and Example

You can easily make changes to text the SkLib's text functions. This function returns text, so you can use it in strings.

sklib_capitalizeFirstLetter("this sentence is lowercase.")

Below is an explanation of how it works and what the function returns.

# The first letter of the sentence will always be capitalized.
sklib_capitalizeFirstLetter("this sentence is lowercase.")
# Returns: This sentence is lowercase.

# The rest of the sentence will always be lowercase.
sklib_capitalizeFirstLetter("this SENTENCE is loWerCaSE.")
# Returns: This sentence is lowercase.

Last updated