capitalize() returns a copy of this string having its first letter upper-cased. String. capitalize() returns the original string, if it’s empty or already starts with an upper-case letter. To capitalize first character of each word in the given sentence, refer the second example provided below.