Mercurial > octave
diff src/strfns.cc @ 1572:0d9e10d10bd7
[project @ 1995-10-19 04:31:30 by jwe]
author | jwe |
---|---|
date | Thu, 19 Oct 1995 04:31:30 +0000 |
parents | 89c587478067 |
children | a02f140ed897 |
line wrap: on
line diff
--- a/src/strfns.cc Thu Oct 19 04:21:41 1995 +0000 +++ b/src/strfns.cc Thu Oct 19 04:31:30 1995 +0000 @@ -80,23 +80,9 @@ if (arg.is_string ()) { - Octave_str_obj str = args(0).all_strings (); - - int nr = str.num_strings (); - int nc = str.max_length (); - - // XXX FIXME XXX -- should fill with user-specified value. - - Matrix m (nr, nc, 0); + charMatrix chm = args(0).all_strings (); - for (int i = 0; i < nr; i++) - { - nc = str.elem (i).length (); - for (int j = 0; j < nc; j++) - m (i, j) = toascii (str.elem (i) [j]); - } - - retval = m; + retval = Matrix (chm); } else gripe_wrong_type_arg ("toascii", arg);