[gtkmm] comparing Glib::ustring's ...
- From: bart <gtkmm hakvoort be>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: [gtkmm] comparing Glib::ustring's ...
- Date: Sat, 10 Apr 2004 23:27:04 +0200
Hi,
When sorting some Glib::ustring's in a list, i encountered a strange
problem. If i compare "AAA" to "aaa", i expect "AAA" to be
alphabetically first. But according to the overloaded '<', "aaa" is
first :S
I have always learned uppercase comes first and other STL sorting
methods seem to honor this. ( e.g. sort )
I am quite pissed off by this behaviour and hope someone can shed some
ligth on this. Attached to this message is a scrap of code which
illustrates my problem.
TIA,
Bart
----------------------------------------------------
#include <iostream>
#include <glibmm/ustring.h>
int main()
{
Glib::ustring test1="AAA",test2="aaa";
std::cout << (test1<test2) << std::endl;
std::cout << (test1>test2) << std::endl;
std::cout << (test1==test2) << std::endl;
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]