Main Content

lower

Convert strings to lowercase

Description

newStr = lower(str) converts all uppercase characters in str to the corresponding lowercase characters and leaves all other characters unchanged.

example

Examples

collapse all

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

You can create string arrays using double quotes.

Convert a string array to contain lowercase characters.

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

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

Input Arguments

collapse all

Input array, specified as a string array, character array, or cell array of character vectors.

Tips

For character arrays, the lower function supports only the character sets:

  • PC: Windows® Latin-1

  • Other: ISO® Latin-1 (ISO 8859-1)

For string arrays, the lower function supports Unicode®.

Extended Capabilities

Version History

Introduced before R2006a