stri_compare, stri_order,
stri_unique, stri_duplicated,
as well as stri_detect_coll
and other stringi-search-coll functions.stri_opts_collator(locale = NULL, strength = 3L,
alternate_shifted = FALSE, french = FALSE, uppercase_first = NA,
case_level = FALSE, normalization = FALSE, numeric = FALSE)NULL or
"" for default locale1 for the most permissive collation rules, 4 for the most
strict onesFALSE
treats all the code points with non-ignorable primary weights in the same way,
TRUE causes code points with primary weights that are equal or below
the variable top value to be ignored on primary levelTRUE results in secondary weights being considered backwardsNA
orders upper and lower case letters in accordance to their tertiary weights,
TRUE forces upper case letters to sort before lower case letters,
FALSE does the oppositeTRUE,
then incremental check is performed to see whether the input data is in
the FCD form. If the data is not in the FCD form, incremental NFD
normalization is performedA note on collation strength:
generally, strength set to 4 is
the least permissive.
Set to 2 to ignore case differences.
Set to 1 to also ignore diacritical differences.
The strings are Unicode-normalized before the comparison.
ICU Collation Service Architecture -- ICU User Guide,
icu::Collator Class Reference -- ICU4C API Documentation,
%!==%,
%!=%, %<=%< a="">=%<>,
%<%< a="">%<>, %===%,
%==%, %>=%,
%>%, %stri!==%,
%stri!=%, %stri<=%< a="">=%<>,
%stri<%< a="">%<>, %stri===%,
%stri==%, %stri>=%,
%stri>%; stri_cmp,
stri_cmp_eq, stri_cmp_equiv,
stri_cmp_ge, stri_cmp_gt,
stri_cmp_le, stri_cmp_lt,
stri_cmp_neq,
stri_cmp_nequiv,
stri_compare;
stri_count_coll;
stri_detect_coll;
stri_duplicated,
stri_duplicated_any;
stri_enc_detect2;
stri_extract_all_coll,
stri_extract_first_coll,
stri_extract_first_coll,
stri_extract_last_coll,
stri_extract_last_coll;
stri_extract_words;
stri_locate_all_coll,
stri_locate_first_coll,
stri_locate_first_coll,
stri_locate_last_coll,
stri_locate_last_coll;
stri_locate_boundaries;
stri_locate_words;
stri_order, stri_sort;
stri_replace_all_coll,
stri_replace_first_coll,
stri_replace_first_coll,
stri_replace_last_coll,
stri_replace_last_coll;
stri_split_boundaries;
stri_split_coll;
stri_trans_tolower,
stri_trans_totitle,
stri_trans_toupper;
stri_unique; stri_wrap;
stringi-locale;
stringi-search-collstri_cmp("zupa100", "zupa2") != stri_cmp("zupa100", "zupa2", stri_opts_collator(numeric=TRUE))
stri_cmp("above mentioned", "above-mentioned")
stri_cmp("above mentioned", "above-mentioned", stri_opts_collator(alternate_shifted=TRUE))Run the code above in your browser using DataLab