Mercurial > octave
diff libinterp/dldfcn/chol.cc @ 22280:26109cce022e
New string utility functions to replace caseless_str for liboctave (bug #48726)
* oct-string.h, oct-string.cc: new files that implement strcmp, strcmpi,
strncmp, and strncmpi functions in the new octave::string namespace. This
functions behave like the ones available in the Octave interpreter.
* libinterp/corefcn/strfns.cc: make use of the new functions in liboctave.
* libgui/graphics/QtHandlesUtils.cc, libgui/graphics/QtHandlesUtils.h,
libinterp/corefcn/cellfun.cc, libinterp/dldfcn/chol.cc: make use of the
new functions instead of caseless_str.
* liboctave/util/module.mk: add new files to build system.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Sat, 13 Aug 2016 15:35:58 +0100 |
parents | 2c7acd39e9b7 |
children | 6ca3acf5fad8 |
line wrap: on
line diff
--- a/libinterp/dldfcn/chol.cc Sat Aug 13 12:49:58 2016 +0100 +++ b/libinterp/dldfcn/chol.cc Sat Aug 13 15:35:58 2016 +0100 @@ -33,7 +33,6 @@ #include "oct-spparms.h" #include "sparse-util.h" -#include "caseless-str.h" #include "ov-re-sparse.h" #include "ov-cx-sparse.h" #include "defun-dld.h" @@ -42,6 +41,8 @@ #include "ovl.h" #include "utils.h" +#include "oct-string.h" + template <typename CHOLT> static octave_value get_chol (const CHOLT& fact) @@ -163,13 +164,13 @@ int n = 1; while (n < nargin) { - caseless_str tmp = args(n++).xstring_value ("chol: optional arguments must be strings"); + std::string tmp = args(n++).xstring_value ("chol: optional arguments must be strings"); - if (tmp.compare ("vector")) + if (octave::string::strcmpi (tmp, "vector")) vecout = true; - else if (tmp.compare ("lower")) + else if (octave::string::strcmpi (tmp, "lower")) LLt = true; - else if (tmp.compare ("upper")) + else if (octave::string::strcmpi (tmp, "upper")) LLt = false; else error ("chol: optional argument must be one of \"vector\", \"lower\", or \"upper\"");