Mercurial > hg > octave-nkf
changeset 18146:f8b7e8483b88 gui-release
avoid possible num-to-str warnings from strread.m
* strread.m: Use "\n" instead of 10 and " " instead of 32 in
comparisions with character strings.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 17 Dec 2013 15:02:35 -0600 |
parents | 7721e78b1337 |
children | ab26db8da20a |
files | scripts/io/strread.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/io/strread.m +++ b/scripts/io/strread.m @@ -396,7 +396,7 @@ if (! isempty (white_spaces)) ## Check if trailing "\n" might signal padding output arrays to equal size ## before it is trimmed away below - if ((str(end) == 10) && (nargout > 1)) + if (str(end) == "\n" && nargout > 1) pad_out = 1; endif ## Condense all repeated whitespace into one single space @@ -404,7 +404,7 @@ rxp_wsp = sprintf ("[%s]+", white_spaces); str = regexprep (str, rxp_wsp, ' '); ## Remove possible leading space at string - if (str(1) == 32) + if (str(1) == " ") str = str(2:end); endif ## Check for single delimiter followed/preceded by whitespace