Main Content

lower

将字符串转换为小写

说明

示例

newStr = lower(str)str 中的所有大写字符转换为相应的小写字符,并保留所有其他字符不变。

示例

全部折叠

lower('Hello, World.')
ans = 
'hello, world.'

开始,您可以使用双引号来创建字符串数组。

转换字符串数组以包含小写字符。

str = ["The SOONER,";"the BETTER."]
str = 2x1 string
    "The SOONER,"
    "the BETTER."

newStr = lower(str)
newStr = 2x1 string
    "the sooner,"
    "the better."

输入参数

全部折叠

输入数组,指定为字符串数组、字符数组或字符向量元胞数组。

提示

对于字符数组,lower 函数仅支持字符集:

  • PC:Windows® Latin-1

  • 其他:ISO® Latin-1 (ISO 8859-1)

对于字符串数组,lower 函数支持 Unicode®

扩展功能

版本历史记录

在 R2006a 之前推出