Convert string to lowercase
newTxt = lower(txt)
example
newTxt = lower(txt) converts all uppercase characters in txt to the corresponding lowercase characters and leaves all other characters unchanged.
txt
collapse all
txt = 'Hello, World.'; newTxt = lower(txt)
newTxt = hello, world.
Starting in R2016b, you can create string arrays using the string function.
string
Convert a string array to contain lowercase characters.
txt = string({'The SOONER,';'the BETTER.'})
txt = 2×1 string array "The SOONER," "the BETTER."
newTxt = 2×1 string array "the sooner," "the better."
Text processing functions, such as strfind and regexp, accept string arrays as inputs. Other functions, such as addpath, do not.
strfind
regexp
addpath
Input array, specified as a string array, character array, or cell array of character vectors.
Example:
Data Types: string | char | cell
char
cell
This function fully supports tall arrays. For more information, see Tall Arrays.
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®.
char | isstrprop | reverse | string | upper
isstrprop
reverse
upper