Learn R Programming

strs (version 0.1.0)

strs_isascii: Check if string contains only ascii characters

Description

strs_isascii determines whether each element of a character vector contains only ASCII characters. It is similar to Python's str.isascii() method.

Usage

strs_isascii(string)

Value

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

Arguments

string

A character vector to be checked.

See Also

Examples

Run this code
strs_isascii("hello")
strs_isascii("héllo")

Run the code above in your browser using DataLab