Last chance! 50% off unlimited learning
Sale ends in
strcmp(s1, s2)
strcmpi(s1, s2)
TRUE
if s1
and s2
have the same length
as character vectors and all elements are equal as character strings, else
FALSE
.strcmp
comparisons are case-sensitive, while for strcmpi
the are case-insensitive. Leading and trailing blanks do count.strcat
strcmp(c("yes", "no"), c("yes", "no"))
strcmpi(c("yes", "no"), c("Yes", "No"))
Run the code above in your browser using DataLab