Skip to contents

Returns a logical vector testing equality of strings from two string vectors

Usage

sf_compare(x, y, nthreads = getOption("stringfish.nthreads", 1L))

sf_equals(x, y, nthreads = getOption("stringfish.nthreads", 1L))

Arguments

x

A character vector of length 1 or the same non-zero length as y

y

Another character vector of length 1 or the same non-zero length as y

nthreads

Number of threads to use

Value

A logical vector

Details

Note: the function tests semantic string equality. Non-byte text is normalized to a UTF-8 working representation, while `CE_BYTES` strings are compared byte-for-byte.

Examples

sf_compare(letters, "a")
#>  [1]  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [25] FALSE FALSE