I love it, thanks! :)

Staffan


On Thu, Feb 7, 2013 at 11:53 PM, Rick McGuire <object.r...@gmail.com> wrote:

> The equality test is done using the "==" method.  If you do the query
> using an object that overrides "==", you can get the behavior you want.
>  Here's a simple example:
>
> a = .array~of("Rick", "Mark", "David")
>
> i = a~index(.caselessIndex~new("mark"))
> say i
>
> ::class caselessIndex
> ::method init
>   expose string
>   use arg string
>
> ::method "=="
>   expose string
>   use arg other
>   return string~caselessCompare(other) == 0
>
> Rick
>
>
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to