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

stri_opts_fixed

Generate a List with Fixed Pattern Search Engine's Settings


Description

A convenience function used to tune up the behavior of stri_*_fixed functions, see stringi-search-fixed.

Usage

stri_opts_fixed(case_insensitive = FALSE, overlap = FALSE, ...)

Arguments

case_insensitive

logical; enable simple case insensitive matching

overlap

logical; enable overlapping matches' detection

...

[DEPRECATED] any other arguments passed to this function generate a warning; this argument will be removed in the future

Details

Case-insensitive matching uses a simple, single-code point case mapping (via ICU's u_toupper() function). Full case mappings should be used whenever possible because they produce better results by working on whole strings. They also take into account the string context and the language, see stringi-search-coll.

Searching for overlapping pattern matches is available in stri_extract_all_fixed, stri_locate_all_fixed, and stri_count_fixed functions.

Value

Returns a named list object.

References

C/POSIX Migration – ICU User Guide, http://userguide.icu-project.org/posix#case_mappings

See Also

Other search_fixed: about_search_fixed, about_search

Examples

stri_detect_fixed('ala', 'ALA') # case-sensitive by default
stri_detect_fixed('ala', 'ALA', opts_fixed=stri_opts_fixed(case_insensitive=TRUE))
stri_detect_fixed('ala', 'ALA', case_insensitive=TRUE) # equivalent

stringi

Character String Processing Facilities

v1.6.1
file LICENSE
Authors
Marek Gagolewski [aut, cre, cph] (<https://orcid.org/0000-0003-0637-6028>), Bartek Tartanus [ctb], and others (stringi source code); IBM, Unicode, Inc. and others (ICU4C source code, Unicode Character Database)
Initial release
2021-05-05

We don't support your browser anymore

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