Mercurial > octave
diff scripts/plot/uigetfile.m @ 17405:3f0ed69d21c6
Replace unnecessary instances of strncmp with strcmp.
* scripts/optimization/optimget.m, scripts/plot/__gnuplot_drawnow__.m,
scripts/plot/fill.m, scripts/plot/private/__go_draw_axes__.m,
scripts/plot/private/__pie__.m, scripts/plot/private/__print_parse_opts__.m,
scripts/plot/private/__quiver__.m, scripts/plot/private/__tight_eps_bbox__.m,
scripts/plot/stairs.m, scripts/plot/uigetfile.m, scripts/strings/strsplit.m,
scripts/strings/validatestring.m: Replace unnecessary instances of strncmp with
strcmp.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 10 Sep 2013 18:31:39 -0700 |
parents | bc924baa2c4e |
children | 266fafd1ffc1 |
line wrap: on
line diff
--- a/scripts/plot/uigetfile.m Tue Sep 10 16:31:34 2013 -0700 +++ b/scripts/plot/uigetfile.m Tue Sep 10 18:31:39 2013 -0700 @@ -103,9 +103,9 @@ val = varargin{i}; if (ischar (val)) val = tolower (val); - if (strncmp (val, "multiselect", 11)) + if (strcmp (val, "multiselect")) idx1 = i; - elseif (strncmp (val, "position", 8)) + elseif (strcmp (val, "position")) idx2 = i; endif endif @@ -168,13 +168,13 @@ for i = stridx : 2 : nargin prop = varargin{i}; val = varargin{i + 1}; - if (strncmp (tolower (prop), "position", 8)) + if (strcmpi (prop, "position")) if (ismatrix (val) && length (val) == 2) outargs{4} = val; else error ("uigetfile: expecting 2-element vector for position argument"); endif - elseif (strncmp (tolower (prop), "multiselect", 11)) + elseif (strcmpi (prop, "multiselect", 11)) if (ischar (val)) outargs{5} = tolower (val); else