📜  在R编程中将字符串从大写转换为小写 - tolower() 方法

📅  最后修改于: 2022-05-13 01:55:15.945000             🧑  作者: Mango

在R编程中将字符串从大写转换为小写 - tolower() 方法

R 编程中的tolower()方法用于将字符串的大写字母转换为小写字符串。

示例 1:

# R program to convert string
# from uppercase to lowercase
gfg <- "GeEks FoR GeeKs"
  
# Using tolower() method
answer <- tolower(gfg)
  
print(answer)

输出:

[1] "geeks for geeks"

示例 2:

# R program to convert string
# from uppercase to lowercase
  
# Given String
gfg <- "The QuiCk bRown FoX jUmpS oVer tHe LaZy dOG"
  
# Using tolower() method
answer <- tolower(gfg)
  
print(answer)

输出:

[1] "the quick brown fox jumps over the lazy dog"