strs_isalnum: Check if string is alphanumeric

View source: R/isalnum.R

strs_isalnumR 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")

strs documentation built on Sept. 11, 2024, 6:44 p.m.