string_identical: string_identical

View source: R/sf_functions.r

string_identicalR Documentation

string_identical

Description

A stricter comparison of string equality

Usage

string_identical(x, y)

Arguments

x

A character vector

y

Another character to compare to x

Value

TRUE if strings are identical, including encoding

See Also

identical

Examples

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

stringfish documentation built on May 31, 2023, 5:19 p.m.