upper - Convert strings to uppercase - MATLAB (original) (raw)

Main Content

Convert strings to uppercase

Syntax

Description

newStr = upper([str](#bu55fwd-txt)) converts all lowercase characters in str to the corresponding uppercase characters and leaves all other characters unchanged.

Examples

collapse all

Convert a string array to contain uppercase characters.

str = ["The SOONER,";"the BETTER."]

str = 2×1 string "The SOONER," "the BETTER."

newStr = 2×1 string "THE SOONER," "THE BETTER."

Input Arguments

collapse all

Input array, specified as a string array, character array, or cell array of character vectors.

Tips

For character arrays, the upper function supports the character sets:

For string arrays, the upper function supports Unicode®.

Extended Capabilities

expand all

Theupper function fully supports tall arrays. For more information, see Tall Arrays.

Usage notes and limitations:

Version History

Introduced before R2006a