To capitalize the first character of a string, We can use the charAt() to separate the first character and then use the toUpperCase() function to capitalize it.
Which function capitalizes first letter of string in Python?
string capitalize() in Python
In Python, the capitalize() method returns a copy of the original string and converts the first character of the string to a capital (uppercase) letter while making all other characters in the string lowercase letters. Syntax: Attention geek!
Which text function capitalizes the first letter of each word?
the function 'PROPER' The 'PROPER' function works the same way its cousins 'LOWER' and 'UPPER' do. The difference is, that it only capitalizes the first letter of each substring of text. This could be a single word.