Learn R Programming

stringfish (version 0.16.0)

string_identical: string_identical

Description

A stricter comparison of string equality

Usage

string_identical(x, y)

Value

TRUE if strings are identical, including encoding

Arguments

x

A character vector

y

Another character to compare to x

See Also

identical

Examples

Run this code
x <- "fa\xE7ile"
Encoding(x) <- "latin1"
y <- iconv(x, "latin1", "UTF-8")
identical(x, y) # TRUE
string_identical(x, y) # FALSE

Run the code above in your browser using DataLab