Mercurial > hg > octave-nkf
diff 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 |
line wrap: on
line diff
--- a/scripts/strings/strsplit.m +++ b/scripts/strings/strsplit.m @@ -160,7 +160,7 @@ endif ## Save the length of the "delimitertype" parameter - length_deltype = numel (args.delimitertype); + length_deltype = length (args.delimitertype); if (nargin == 1 || (nargin > 1 && (islogical (del) || isnumeric (del)))) if (nargin > 1) @@ -168,7 +168,7 @@ args.collapsedelimiters = del; endif ## Set proper default for the delimiter type - if (strncmpi (args.delimitertype, "simple", numel (args.delimitertype))) + if (strncmpi (args.delimitertype, "simple", length (args.delimitertype))) del = {" ","\f","\n","\r","\t","\v"}; else del = "\\s";