strcmp: MATLAB strcmp function

View source: R/strcmp.R

strcmpR Documentation

MATLAB strcmp function

Description

Compare strings.

Usage

strcmp(S, T)

Arguments

S, T

character vectors to evaluate

Details

Comparisons are case-sensitive and any leading and trailing blanks in either of the strings are explicitly included in the comparison.

Value

Returns TRUE if S is identical to T; otherwise, FALSE.

Note

Value returned is the opposite of the C language convention.

Author(s)

P. Roebuck proebuck1701@gmail.com

Examples

strcmp("foo", "bar")  # FALSE
strcmp(c("yes", "no"), c("yes", "no"))	# TRUE

matlab documentation built on July 1, 2024, 5:07 p.m.