time | Calls | line |
---|
| | 1 | function tf = isCharString(s,allowEmpty) %#codegen
|
| | 2 | %ISCHARSTRING True for a string
|
| | 3 | % T = ISCHARSTRING(S) returns true if S is a 1xN character vector
|
| | 4 | % for N >= 0, or the 0x0 char array ''.
|
| | 5 | %
|
| | 6 | % T = ISCHARSTRING(S,FALSE) returns true only if S is a non-empty
|
| | 7 | % character vector.
|
| | 8 |
|
| | 9 | % Copyright 2012-2019 The MathWorks, Inc.
|
| | 10 |
|
< 0.001 | 16 | 11 | if nargin < 2 || allowEmpty
|
< 0.001 | 16 | 12 | tf = ischar(s) && (isrow(s) || isequal(s,''));
|
| | 13 | else
|
| | 14 | tf = ischar(s) && isrow(s) && ~all(isspace(s));
|
< 0.001 | 16 | 15 | end
|
Other subfunctions in this file are not included in this listing.