Turn on/off case sensitivity for Searchable and Pattern objects

Description

Functions for affecting the case sensitivity of matching/

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
ignore.case(object)

## S3 method for class 'SearchableOrPattern'
ignore.case(object, ...)

## S3 method for class 'character'
ignore.case(object)

## Default S3 method:
ignore.case(object)

case_insensitive(object)

use.case(object)

## S3 method for class 'SearchableOrPattern'
use.case(object)

## S3 method for class 'character'
use.case(object)

## Default S3 method:
use.case(object)

case_sensitive(object)

Arguments

object

search pattern or target

...

additional arguments

ignore.case/case_insensitive and use.case/case_sensitive control the case sensitivity of the matching

The default is to perform case-sensitive matching.

See Also

stri_detect_* from the stringi package

Examples

1
2
use.case("pattern")     # case-sensitive (Default)
  ignore.case("pattern")  # case-insensitive