[rules-users] comparing strings using ignore case

Wolfgang Laun wolfgang.laun at gmail.com
Fri Jul 6 10:29:15 EDT 2012


You can write a custom operator which would let you write
   ObjectTypeB( name  equalsignorecase foo.name ) )
You can choose a shorter name for the operator ;-)
-W

On 06/07/2012, abhinay_agarwal <abhinay_agarwal at infosys.com> wrote:
> hey,
>
> is there a method by which i can compare two string ignoring there case ??
>
> for me writing the code as
>
> foo : ObjectTypeA()
> bar : ObjectTypeB( name.equalsIgnoreCase( foo.name ) )
>
> is a long process because i m comparing the values of string which are
> present inside a map..and there are loads of comparision..
>
> $h : HashMap(this["Account_Ownership_Type"]=="Single")
>
> Does drools have an easier way for ignore case comparision ??
>
> Thanks,
> Abhinay
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/comparing-strings-using-ignore-case-tp4018504.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list