Convert strings to lowercase
newStr = lower(str)
example
newStr = lower(str) converts all uppercase characters in str to the corresponding lowercase characters and leaves all other characters unchanged.
str
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 "The SOONER," "the BETTER."
newStr = 2x1 string "the sooner," "the better."
Input array, specified as a string array, character array, or cell array of character vectors.
For character arrays, the lower function supports only the character sets:
lower
PC: Windows® Latin-1
Other: ISO® Latin-1 (ISO 8859-1)
For string arrays, the lower function supports Unicode®.
This function fully supports tall arrays. For more information, see Tall Arrays.
Usage notes and limitations:
Input array must be a string scalar or a character array.
Input values must be in the range 0–127.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).
char | isstrprop | reverse | string | upper
char
isstrprop
reverse
string
upper
You have a modified version of this example. Do you want to open this example with your edits?