Main Content

upper

Convert a string to uppercase

Since R2021b

Description

example

newStr = upper(str) converts the lowercase characters in the string str to the corresponding uppercase characters.

Note

The upper operator is not supported in Stateflow® charts that use C as the action language.

Examples

expand all

Convert the lowercase characters and return the string "HELLO, WORLD!"

str = "Hello, world!";
newStr = upper(str);

Stateflow chart that uses the upper operator in a state.

Input Arguments

expand all

Input string, specified as a string scalar. Enclose literal strings with double quotes.

Example: "Hello"

Limitations

Version History

Introduced in R2021b