mlreportgen.utils.capitalizeFirstChar

Capitalize first character of string

Description

example

capOut = mlreportgen.utils.capitalizeFirstChar(strchar) capitalizes the first character of the input character vector or string scalar.

Examples

collapse all

strInput = 'this character vector needs an initial capital letter.';
capOut = mlreportgen.utils.capitalizeFirstChar(strInput)
capOut
  'This character vector needs an initial capital letter.'

Input Arguments

collapse all

Text whose first character is to be capitalized, specified as a character vector or string scalar.

Output Arguments

collapse all

Text with first letter capitalized, specified as a character vector or string scalar. If the input is a character vector, the output is a character vector. If the input is a string scalar, the output is a string scalar.

Introduced in R2018b