equalsIgnoreCase.String: Compares this String to another String, ignoring case...

Description Usage Arguments Value Author(s) See Also Examples

Description

Compares this String to another object, ignoring case considerations. The result is TRUE if and only if the argument is not null and is a String object or a character string that represents the same sequence of characters as this object ignoring the case.

Usage

1
2
## S3 method for class 'String'
equalsIgnoreCase(this, obj, ...)

Arguments

obj

The object to compared to.

Value

Returns TRUE if the the strings are equal, otherwise FALSE.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

See Also

*equals(), *compareTo(), *regionMatches()

Examples

1
2
3
4
5
6
7
8
   s1 <- String("Hello world!")
   s2 <- String("hello world!")
   s3 <- String("Hello world!")

   equals(s1, s2)                   # FALSE
   equalsIgnoreCase(s1, s2)         # TRUE
   equalsIgnoreCase("abc", "ABC")   # TRUE
 

HenrikBengtsson/R.lang documentation built on May 8, 2019, 7:50 p.m.