Page 1 of 1

Question to LikeI used *withOUT* a wildcard

Posted: 29 Nov 2017 14:06
by PeterH
This is just to verify: is "Abc" LikeI "abC" (no wildcard!)
exact identical to "Abc" == "abC" - but case-insensitive?
As it's much easier:

Code: Select all

  If ($a LikeI $b) {...}

instead of

  $a = recase($a, 'upper');
  $b = recase($b, 'upper');
  If ($a == $b) {...} 
If it is: maybe it would be fine to add a help-example:

echo "Abc" LikeI "abC"; //1 (no wildcard!)

(Or might there be a form of == to be case-insensitive? I don't think so...)

Re: Question to LikeI used *withOUT* a wildcard

Posted: 29 Nov 2017 14:24
by highend
Sure it is.

I guess you missed a tiny part in the description:
Where string is any string expression and Pattern may contain the usual wildcards and special chars used in XY patterns
Or might there be a form of == to be case-insensitive?
Some languages use this form of comparison (two instead of one =) to do case-sensitive / case-insensitive comparisons,
XY doesn't :mrgreen:

Re: Question to LikeI used *withOUT* a wildcard

Posted: 29 Nov 2017 14:55
by admin
PeterH wrote:If it is: maybe it would be fine to add a help-example:

echo "Abc" LikeI "abC"; //1 (no wildcard!)
Done. :)

Re: Question to LikeI used *withOUT* a wildcard

Posted: 29 Nov 2017 20:51
by PeterH
2 * thanks!

Yes - I've ignored the 'may contain'. :oops:

I think Don's help-extension makes it a bit more clear.

So: thanks again :tup: