Check if a string is alphanumeric.

Share:

Description

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

Usage

1

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

1
2
3
4
pystr_isalnum("abc")
pystr_isalnum("abc123")
pystr_isalnum("abc123!")
pystr_isalnum(c("one", "2", "three!"))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.