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: Tue, 9 Aug 2016 03:31:20 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

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

I think this class is meant as helper for input check from the interpreter.
And is meant to be compared against hardcoded strings which we know whether
they are upper or lower case. Because of that, having the existing compare
method, lowercase both strings could be avoided.

This
https://bitbucket.org/carandraug/octave/commits/cb281077b99be71ee87fe80e8e3c5fab93fc010a
adds two methods, compare_lower and compare_upper for such cases. This methods
return an int, not a bool, with the same semantycs one would expect from
std::string::compare().

I am also thinking that they might be better implemented as free functions on
the octave namespace.

    _______________________________________________________

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]