This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

lower

Convert strings to lowercase

Syntax

newStr = lower(str)

Description

example

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

Examples

collapse all

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

Starting in R2017a, you can create string arrays using double quotes.

Convert a string array to contain lowercase characters.

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

newStr = lower(str)
newStr = 2x1 string array
    "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

Introduced before R2006a