Main Content

isletter

Determine which characters are letters

Since R2021b

Description

example

tf = isletter(str) returns a Boolean array based on whether each character of str is a letter or not.

Note

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

Examples

expand all

Create a Boolean vector of the form [1 1 1 1 1 0 0 1 1 1 1 1 0].

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

Stateflow chart that uses the isletter 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