stringi (version 0.2-3)

stri_trans_tolower: Transform String with Case Mapping

Description

These functions transform strings either to lower case, UPPER CASE, or to Title Case.

Usage

stri_trans_tolower(str, locale = NULL)

stri_trans_toupper(str, locale = NULL)

stri_trans_totitle(str, locale = NULL)

Arguments

str
character vector
locale
NULL or "" for case mapping following the conventions of the default locale, or a single string with locale identifier, see stringi-locale.

Value

  • Each function returns a character vector.

Details

ICU implements full Unicode string case mappings. In general,
  • case mapping can change the number of code points and/or code units of a string,
  • is language-sensitive (results may differ depending on locale), and
  • is context-sensitive (a character in the input string may map differently depending on surrounding characters).

For more general (but not locale dependent) text transforms refer to stri_trans_general.

References

Case Mappings -- ICU User Guide, http://userguide.icu-project.org/transforms/casemappings

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_split_coll; stri_unique; stri_wrap; stringi-locale; stringi-search-coll

Other transform: stri_trans_general; stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd; stri_trans_list

Examples

Run this code
stri_trans_toupper("\u00DF", "de_DE") # small German Eszett / scharfes S
stri_cmp_eq(stri_trans_toupper("i", "en_US"), stri_trans_toupper("i", "tr_TR"))
stri_trans_toupper(c('abc','123','\u0105\u0104'))
stri_trans_tolower(c('AbC','123','\u0105\u0104'))
stri_trans_totitle(c('AbC','123','\u0105\u0104'))
stri_trans_totitle("aLA mA kOTA")

Run the code above in your browser using DataLab