stri_enc_isascii: Check If a Data Stream Is Possibly in ASCII

Description Usage Arguments Details Value See Also Examples

Description

The function checks whether all bytes in a string are in the set 1,2,...,127.

Usage

1

Arguments

str

character vector, a raw vector, or a list of raw vectors

Details

This function is independent of the way R marks encodings in character strings (see Encoding and stringi-encoding).

Value

Returns a logical vector. Its i-th element indicates whether the i-th string corresponds to a valid ASCII byte sequence.

See Also

Other encoding_detection: stri_enc_detect2; stri_enc_detect; stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le; stri_enc_isutf8; stringi-encoding

Examples

1
2

Example output

[1] TRUE TRUE TRUE
[1] FALSE

stringi documentation built on May 2, 2019, 4:54 p.m.