1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/encoding.R
\name{is_ascii}
\alias{is_ascii}
\title{Check if a character vector consists of entirely ASCII characters}
\usage{
is_ascii(x)
}
\arguments{
\item{x}{A character vector.}
}
\value{
A logical vector indicating whether each element of the character
vector is ASCII.
}
\description{
Converts the encoding of a character vector to \code{'ascii'}, and check if
the result is \code{NA}.
}
\examples{
library(xfun)
is_ascii(letters) # yes
is_ascii(intToUtf8(8212)) # no
}
|