Description Usage Arguments Details Value See Also Examples
This function checks if there is at least one occurrence of a fixed pattern in a string.
1 | stri_detect_fixed(str, pattern, opts_collator = list())
|
str |
character vector |
pattern |
character vector |
opts_collator |
a named list as generated with
|
Vectorized over str
and pattern
.
See stringi-search-fixed for more details on locale-sensitive text searching in stringi.
If pattern
is empty, then the result is NA
and a warning is generated.
Pass opts_collator
equal to NA
for much
faster, but locale unaware, (exact) byte comparisons. For
natural language text this may be not what you really want.
Returns a logical vector.
Other locale_sensitive: stri_cmp
,
stri_compare
; stri_count_fixed
;
stri_enc_detect2
;
stri_locate_all_fixed
,
stri_locate_all_fixed,
,
stri_locate_first_fixed
,
stri_locate_first_fixed,
,
stri_locate_last_fixed
,
stri_locate_last_fixed
;
stri_opts_collator
; stri_order
,
stri_sort
;
stri_replace_all_fixed
,
stri_replace_all_fixed
,
stri_replace_first_fixed
,
stri_replace_first_fixed
,
stri_replace_last_fixed
,
stri_replace_last_fixed
;
stri_split_fixed
,
stri_split_fixed
;
stri_trans_tolower
,
stri_trans_totitle
,
stri_trans_toupper
;
stringi-locale
;
stringi-search-fixed
Other search_detect: stri_detect_charclass
;
stri_detect_regex
; stri_detect
;
stringi-search
Other search_fixed: stri_count_fixed
;
stri_extract_all_fixed
,
stri_extract_all_fixed,
,
stri_extract_first_fixed
,
stri_extract_first_fixed,
,
stri_extract_last_fixed
,
stri_extract_last_fixed
;
stri_locate_all_fixed
,
stri_locate_all_fixed,
,
stri_locate_first_fixed
,
stri_locate_first_fixed,
,
stri_locate_last_fixed
,
stri_locate_last_fixed
;
stri_opts_collator
;
stri_replace_all_fixed
,
stri_replace_all_fixed
,
stri_replace_first_fixed
,
stri_replace_first_fixed
,
stri_replace_last_fixed
,
stri_replace_last_fixed
;
stri_split_fixed
,
stri_split_fixed
;
stringi-search-fixed
;
stringi-search
1 2 3 4 5 | ## Not run:
stri_detect_fixed(c("stringi w R","REXAMINE","123"), c('i','R','0'), opts_collator=NA)
stri_detect_fixed(c("stringi w R","REXAMINE","123"), 'R', opts_collator=NA)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.