Description Usage Arguments Details Value References See Also Examples
These functions translate strings either to lower case, UPPER CASE, or to Title Case.
1 2 3 4 5 | stri_trans_tolower(str, locale = NULL)
stri_trans_toupper(str, locale = NULL)
stri_trans_totitle(str, locale = NULL)
|
str |
character vector |
locale |
|
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).
Each function returns a character vector.
Case Mappings – ICU User Guide, http://userguide.icu-project.org/transforms/casemappings
Other locale_sensitive: stri_cmp
,
stri_compare
; stri_count_fixed
;
stri_detect_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
;
stringi-locale
;
stringi-search-fixed
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
stri_trans_toupper("\u00DF", "de_DE") # small German double s
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")
stri_trans_totitle('taming of the shrew', locale='en_US') # TODO: we are working on this
## End(Not run)
|
[1] "SS"
[1] TRUE
[1] "ABC" "123" "<U+0104><U+0104>"
[1] "abc" "123" "<U+0105><U+0105>"
[1] "Abc" "123" "<U+0104><U+0105>"
[1] "Ala Ma Kota"
[1] "Taming Of The Shrew"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.