[Gambas-user] Gambas Comparison constant Gb.Like - How does it work ?
Benoît Minisini
gambas at ...1...
Wed Aug 14 20:18:31 CEST 2013
Le 14/08/2013 19:49, Ian Roper a écrit :
> Greetings,
>
> Could you please explain the way in which the comparison constant
> 'gb.like' works.
> I tried to use this to search a string array.
>
> TmpArry.Add("Something")
> TmpArry.Add("Another Thing")
> If TmpArry.Find("some",gb.like) > -1 then {/this does not work}//
> /
> I found the behavior was the same as gb.IgnoreCase.
> it will return a value of the Array Index if you do this
>
> If TmpArry.Find("something",gb.like) > -1 then {/this does work !}//
> /
> I made the assumption that it would search from left to right starting
> at the 'Start' parameter
> I tried this:
> If TmpArry.Find("some",gb.like,0) > -1 then {/this does not work}//
> /
> If TmpArry.Find("some",gb.like,1) > -1 then {/this does not work}//
>
> /There was no difference in the results.
>
> Many thanks.
>
> Ian
> //
It works like the LIKE instruction. Did you read the documentation of
the LIKE instruction?
--
Benoît Minisini
More information about the User
mailing list