%% Determine Types of Characters in String Arrays
% Create string arrays. Then determine which characters belong to various categories using the isstrprop function.
% Create a string scalar and determine which of its characters are numeric digits. Starting in R2017a, you can create strings using double quotes.

str = "123 Maple Street"

%

TF = isstrprop(str,'digit')

%
% Create a nonscalar string array. Determine which characters in each string are whitespace characters. isstrprop returns a cell array in which each cell contains results for a string in str.

str = ["123 Maple St.";"456 Oak St."]

%

TF = isstrprop(str,'wspace')

%
% To display the results for the second string, str(2), index into TF{2}.

TF{2}

% Copyright 2012 The MathWorks, Inc.