Main Content

isspace

确定 Stateflow 图中哪些字符是空格

自 R2021b 起

描述

示例

tf = isspace(str) 根据 str 的每个字符是否为空格返回布尔数组。

注意

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

示例

全部展开

创建一个形式为 [0 0 0 0 0 0 1 0 0 0 0 0 0] 的布尔向量。

str = "Hello, world!";
X = isspace(str);

Stateflow chart that uses the isspace operator in a state.

输入参数

全部展开

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

示例: "Hello"

限制

版本历史记录

在 R2021b 中推出