comparison scripts/strings/strsplit.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 6dbc866379e2
children d63878346099
comparison
equal deleted inserted replaced
17404:5e552cd9315a 17405:3f0ed69d21c6
158 if (strcmpi (args.delimitertype, "default")) 158 if (strcmpi (args.delimitertype, "default"))
159 args.delimitertype = "simple"; 159 args.delimitertype = "simple";
160 endif 160 endif
161 161
162 ## Save the length of the "delimitertype" parameter 162 ## Save the length of the "delimitertype" parameter
163 length_deltype = numel (args.delimitertype); 163 length_deltype = length (args.delimitertype);
164 164
165 if (nargin == 1 || (nargin > 1 && (islogical (del) || isnumeric (del)))) 165 if (nargin == 1 || (nargin > 1 && (islogical (del) || isnumeric (del))))
166 if (nargin > 1) 166 if (nargin > 1)
167 ## Second input is the "collapsedelimiters" parameter 167 ## Second input is the "collapsedelimiters" parameter
168 args.collapsedelimiters = del; 168 args.collapsedelimiters = del;
169 endif 169 endif
170 ## Set proper default for the delimiter type 170 ## Set proper default for the delimiter type
171 if (strncmpi (args.delimitertype, "simple", numel (args.delimitertype))) 171 if (strncmpi (args.delimitertype, "simple", length (args.delimitertype)))
172 del = {" ","\f","\n","\r","\t","\v"}; 172 del = {" ","\f","\n","\r","\t","\v"};
173 else 173 else
174 del = "\\s"; 174 del = "\\s";
175 endif 175 endif
176 endif 176 endif