string <- 'abcd'
大写
> toupper(string) #大写
[1] "ABCD"
首字母大写
> stringr::str_to_title(string) #首字母大写
[1] "Abcd"
小写
> tolower(string )#小写
[1] "abcd"
string <- 'abcd'
> toupper(string) #大写
[1] "ABCD"
> stringr::str_to_title(string) #首字母大写
[1] "Abcd"
> tolower(string )#小写
[1] "abcd"
本文标题:字符串大小写转换
本文链接:https://www.haomeiwen.com/subject/jwsnurtx.html
网友评论