stringi (version 0.2-5)

stri_split_coll: Split a String By Canonically Equivalent Pattern Matches

Description

Splits each element of str into substrings. pattern indicates delimiters that separate the input into fields. The input data between the matches become the fields themselves.

Usage

stri_split_coll(str, pattern, n_max = -1L, omit_empty = FALSE,
  opts_collator = NULL)

Arguments

str
character vector with strings to search in
pattern
character vector with fixed patterns
n_max
integer vector, maximal number of pieces to return
omit_empty
logical vector; determines whether empty strings should be removed from the result
opts_collator
a named list with ICU Collator's settings as generated with stri_opts_collator; NULL for default settings

Value

  • Returns a list of character vectors.

Details

Vectorized over str, pattern, n_max, and omit_empty.

If n_max is negative (default), then all pieces are extracted.

omit_empty is applied during splitting: if set to TRUE, then empty strings will never appear in the resulting vector.

This is a locale-sensitive text operation. See stringi-search-coll for more details on locale-sensitive text searching in stringi.

See Also

Other locale_sensitive: %!==%, %!=%, %<=%< 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_opts_collator; 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_trans_tolower, stri_trans_totitle, stri_trans_toupper; stri_unique; stri_wrap; stringi-locale; stringi-search-coll

Other search_coll: stri_count_coll; stri_detect_coll; stri_extract_all_coll, stri_extract_first_coll, stri_extract_first_coll, stri_extract_last_coll, stri_extract_last_coll; stri_locate_all_coll, stri_locate_first_coll, stri_locate_first_coll, stri_locate_last_coll, stri_locate_last_coll; stri_replace_all_coll, stri_replace_first_coll, stri_replace_first_coll, stri_replace_last_coll, stri_replace_last_coll; stringi-search-coll; stringi-search

Other search_split: stri_split_boundaries; stri_split_charclass; stri_split_fixed; stri_split_lines, stri_split_lines1, stri_split_lines1; stri_split_regex; stri_split; stringi-search