Re: [gtkmm] comparing Glib::ustring's ...
- From: bart <gtkmm hakvoort be>
- To: Murray Cumming <murrayc murrayc com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] comparing Glib::ustring's ...
- Date: Sun, 11 Apr 2004 00:01:45 +0200
That's exactly my problem, i don't want that ;-)
"AAA" shouldn't be smaller then "aaa", should it?
Do you think language settings can make a difference while comparing
strings? This can be important to me, since i mostly work in an mixed
english/dutch environment.
On Sat, 2004-04-10 at 23:52, Murray Cumming wrote:
> 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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]