R: MATLAB strcmp function

strcmp {matlab} | R 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 proebuck@mdanderson.org

### Examples

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

[Package matlab version 1.0.2 Index]