[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/
- [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning, Carnë Draug, 2016/08/08
- [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning, Carnë Draug, 2016/08/08
- [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning, Kai Torben Ohlhus, 2016/08/09
- [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning, Carnë Draug, 2016/08/09
- [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning, Kai Torben Ohlhus, 2016/08/09
- [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning, Carnë Draug, 2016/08/09
- [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning, Carnë Draug, 2016/08/10
- [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning, Carnë Draug, 2016/08/10
- [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning, Rik, 2016/08/11
- [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning, Carnë Draug, 2016/08/11
- [Octave-bug-tracker] [bug #48726] caseless_str overloads compare and inverts meaning,
Carnë Draug <=