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 16:52:04 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

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

While caseless_str is mostly used in graphics.h, I don't think we should limit
it there. That we don't have something for this in liboctave is the main
reason why oct functions have string options case sensitive while the rest of
Octave is case insensitive.

So what if we add functions for this to the octave namespace. octave::string
sounds good to me. Also, this functions would have the semantics of Octave's
strcmp and strcmpi and only return a bool. I don't think there's an issue of
having the same name as std::strcmp. That's what namespaces are for, and I
think it's more important that we match the behaviour of Octave than C, it
seems less surprising to me.

Something like this
https://bitbucket.org/carandraug/octave/commits/5c04acadf38c8ed08841c5cf23704c688ca724d5

strfns.cc could then be modified to make use of these.

    _______________________________________________________

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]