[Gambas-user] Collection(gb.IgnoreCase)

Jussi Lahtinen jussi.lahtinen at gmail.com
Thu May 4 19:42:19 CEST 2023


 MyCollection = New Collection(gb.IgnoreCase)
Now "MyCollection" is collection number 1.

And ["key1: "v1"] is collection number 2, which is case sensitive.

MyCollection = ["key1": "v1"]
Now "MyCollection" is collection number 2. Collection 1 is lost,
overwritten.


Jussi

On Thu, May 4, 2023 at 8:21 AM Mayost Sharon <sharon at 455.co.il> wrote:

> Thanks
>
> I understand that this:
> MyCollection = ["key1": "v1"]
>   MyCollection = ["KEY1": "v1"]
> In the end there will be only one in the collection
>
> But it would seem that even when I want to know the certain value that is
> in the collection
> Print MyCollection["key1"]
> that it will not be case sensitive
>
> ---------- Original Message -----------
> From: Jussi Lahtinen <jussi.lahtinen at gmail.com>
> To: Gambas Mailing List <user at lists.gambas-basic.org>
> Sent: Thu, 4 May 2023 01:36:37 +0300
> Subject: Re: [Gambas-user] Collection(gb.IgnoreCase)
>
> > >
> > >   MyCollection = New Collection(gb.IgnoreCase)
> > >
> >
> > This defines the collection as case insensitive.
> >
> >   MyCollection = ["k1": "v1"]
> > >
> >
> > This assigns the collection to be inline collection, which is by default
> > case sensitive.
> >
> >  So, instead of using inline collection, use the add method to populate
> it.
> >
> > Jussi
> ------- End of Original Message -------
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230504/20bad250/attachment-0001.htm>


More information about the User mailing list