Navigation

Operators and Keywords

Function List:

C++ API

: isstrprop (str, prop)

Test character string properties.

For example:

isstrprop ("abc123", "alpha")
⇒ [1, 1, 1, 0, 0, 0]

If str is a cell array, isstrpop is applied recursively to each element of the cell array.

Numeric arrays are converted to character strings.

The second argument prop must be one of

"alpha"

True for characters that are alphabetic (letters).

"alnum"
"alphanum"

True for characters that are alphabetic or digits.

"lower"

True for lowercase letters.

"upper"

True for uppercase letters.

"digit"

True for decimal digits (0-9).

"xdigit"

True for hexadecimal digits (a-fA-F0-9).

"space"
"wspace"

True for whitespace characters (space, formfeed, newline, carriage return, tab, vertical tab).

"punct"

True for punctuation characters (printing characters except space or letter or digit).

"cntrl"

True for control characters.

"graph"
"graphic"

True for printing characters except space.

"print"

True for printing characters including space.

"ascii"

True for characters that are in the range of ASCII encoding.

See also: isalpha, isalnum, islower, isupper, isdigit, isxdigit, isspace, ispunct, iscntrl, isgraph, isprint, isascii.

Package: octave