str_to_upper(x2)
str_to_lower(x2)
str_to_title(x2)
字符串排序
默认按照英文字母或数字大小顺序。...高级用法
字符检测
对字符串分隔后的向量与待检测的字符进行比较,生成等长的逻辑值向量。detect 检测全字符,starts 检测首字母,ends 检测末字母。...str_replace(x2,"o","A")
str_replace_all(x2,"o","A")
> str_replace(x2,"o","A")
[1] "The" "birch"..."canAe" "slid" "An" "the"
[7] "smAoth" "planks."
> str_replace_all(x2,"o","A")
[1] "The...,赋值给tmp2(注意标点符号)
tmp2 %
str_replace(',', ' ') %>%
str_replace('\\.','') %>%
str_split