Skip to contents

strs_isalpha checks whether each element of a character vector contains only alphabetical characters. It is similar to Python's str.isalpha() method.

Usage

strs_isalpha(string)

Arguments

string

A character vector to be checked.

Value

A logical vector of the same length as string, indicating whether each element contains only alphabetical characters.

Examples

strs_isalpha("hello")
#> [1] TRUE
strs_isalpha("hello123")
#> [1] FALSE