CAPITALIZE

The function CAPITALIZE takes a string and capitalizes its first letter.

This function takes a single string as input. It outputs another string: the given string, whether a word or a sentence with its first letter capitalized.

Declaration

CAPITALIZE(base_string) -> capitalized_string

Parameters

base_string (required, type: string)

CAPITALIZE() will accept any string as valid input and capitalize the first letter. If the first letter is already capitalized, the output won't differ from the input.

Return Values

capitalized_string (type: string)
The string with the first letter capitalized.
If entering two sentences, only the first letter of the first sentence will be capitalized. If entering a string containing capitalized words, those capitals will be kept in the output.

Examples

The following example takes the string "This is a string" and capitalizes the first letter.
Numbers, punctuation, and already capitalized letters are unaffected. 

CAPITALIZE("this is a string.") -> "This is a string."