A stricter comparison of string equality
Arguments
- x
A character vector
- y
Another character to compare to x
Value
TRUE if strings are identical, including encoding
Examples
x <- "fa\xE7ile"
Encoding(x) <- "latin1"
y <- iconv(x, "latin1", "UTF-8")
identical(x, y) # TRUE
#> [1] TRUE
string_identical(x, y) # FALSE
#> [1] FALSE