Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

upper

将字符串转换为大写

自 R2021b 起

描述

示例

newStr = upper(str) 将字符串 str 中的小写字符转换为对应的大写字符。

注意

使用 C 语言作为动作语言的 Stateflow® 图不支持 upper 运算符。

示例

全部展开

转换小写字符并返回字符串 "HELLO, WORLD!"

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

Stateflow chart that uses the upper operator in a state.

输入参数

全部展开

输入字符串,指定为字符串标量。用双引号将文字字符串引起来。

示例: "Hello"

限制

版本历史记录

在 R2021b 中推出