Re: [gtkmm] comparing Glib::ustring's ...
- From: Murray Cumming <murrayc murrayc com>
- To: bart <gtkmm hakvoort be>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] comparing Glib::ustring's ...
- Date: Sat, 10 Apr 2004 23:52:51 +0200
On Sat, 2004-04-10 at 23:27, bart wrote:
> 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
[snip]
> ----------------------------------------------------
> #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;
> }
I get
1
0
0
which is what I think you want. My LANG is en_US.UTF-8, which probably
makes some difference.
--
Murray Cumming
www.murrayc.com
murrayc murrayc com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]