endsWith.String: Tests if the string ends with specified suffix

Description Usage Arguments Value Author(s) Examples

Description

Tests if the string ends with a suffix or not.

Usage

1
2
## S3 method for class 'String'
endsWith(this, suffix, ...)

Arguments

suffix

The suffix.

Value

Returns TRUE if the string ends with the given suffix, otherwise FALSE.

Author(s)

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

Examples

1
2
3
4
  s <- String("Hello world!")
  endsWith(s, "world")              # FALSE
  endsWith(s, "ld!")                # TRUE
  endsWith("Hello world!", "ld!")   # TRUE

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