Skip to contents

Logical test if two character elements are identical

Usage

strcmp(s1, s2)

Arguments

s1

first character element (string, vector or matrix)

s2

second character element (string, vector or matrix)

Value

a logical element of the same type as the input

Examples

strcmp("yes", "no")
#> [1] FALSE
strcmp("yes", "yes")
#> [1] TRUE
strcmp("no", "no")
#> [1] TRUE