strs_isalnum {strs} | R Documentation |
Check if string is alphanumeric
Description
strs_isalnum
checks whether each element of a character vector is
alphanumeric. This means that the function tests if all characters in the
string are either letters or digits. It is similar to Python's
str.isalnum()
method.
Usage
strs_isalnum(string)
Arguments
string |
A character vector to be checked. |
Value
A logical vector of the same length as string
, with each element
indicating whether the corresponding element of string
is completely
alphanumeric.
See Also
Python str.isalnum() documentation
Examples
strs_isalnum("hello123")
strs_isalnum("hello world")
strs_isalnum("12345")
[Package strs version 0.1.0 Index]