Main Content

upper

Convert a string to uppercase in Stateflow chart

Since R2021b

Description

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

example

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

  • This operator does not support the use of Stateflow structure fields or messages. For more information about structures in Stateflow, see Access Bus Signals.

Version History

Introduced in R2021b

Go to top of page