octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inv


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning
Date: Sat, 13 Aug 2016 14:55:29 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Follow-up Comment #10, bug #48726 (project octave):

I went with the mentioned proposed and added other templates that would
compare a string or Array with a char[].  This allows to use 'strcmp
(some_string, "foo")' without creating a string for "foo".

A possible improvement would be to make the functions with two template
parameters instead of one so that one could compare Array<char> with
std::string.  This is probably very close to work but I didn't do it because I
don't think we have a case for it.

I made use of the new functions in a few places but didn't touch the graphics
and text engine.  I saw caseless_str calling the find method which
caseless_str does not overload.  But it does overload the operator < (and not
the operator > or ==) so I'm guessing it relies on find of the parent class
use only the < operator. Or maybe it meant the find to be case sensitive?  I'm
not sure, so didn't touch those pieces.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48726>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]