Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

strcmp

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)

Examples

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

matlab

MATLAB emulation package

v1.0.2
Artistic-2.0
Authors
P. Roebuck
Initial release
2014-06-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.