Learn R Programming

pystr (version 2.0.0)

pystr_isalnum: Check if a string is alphanumeric.

Description

Return TRUE if all characters in the string are alphanumeric and there is at least one character, FALSE otherwise.

Usage

pystr_isalnum(str)

Arguments

str
A character vector.

Value

A logical vector.

References

https://docs.python.org/3/library/stdtypes.html#str.isalnum

See Also

pystr_isalpha, pystr_isnumeric

Examples

Run this code
pystr_isalnum("abc")
pystr_isalnum("abc123")
pystr_isalnum("abc123!")
pystr_isalnum(c("one", "2", "three!"))

Run the code above in your browser using DataLab