File: is_ascii.Rd

package info (click to toggle)
r-cran-xfun 0.20-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 680 kB
  • sloc: ansic: 242; sh: 22; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 558 bytes parent folder | download | duplicates (3)
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
}