stri_trans_case: Translate String with Case Mapping

Description Usage Arguments Details Value References See Also Examples

Description

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

Usage

1
2
3
4
5

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.

Details

ICU implements full Unicode string case mappings. In general,

Value

Each function returns a character vector.

References

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

See Also

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

Examples

 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)

Example output

[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"

stringi documentation built on May 2, 2019, 4:54 p.m.