[Lazarus] MatchesWindowsMask('[x]','[x]') return False

Bart bartjunk64 at gmail.com
Mon Mar 16 22:13:53 CET 2020


On Mon, Mar 16, 2020 at 12:05 AM Mattias Gaertner via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

> I can't find MatchesWindowMask in Delphi 10.3. I found MatchesMask,
> which works the same. It supports [] too and I can't find any other way
> than [[].

I implemented that variation because MatchesMask treats wildcards like
*nix does: '*.*' doesn't match 'foo'.
Since this is counterintuitive to Windows users (and most likely not
Delphi comapitble) I implemented MatcesWindowsMask.
See the implementation to see how Windows handles wildcards different
in some (corner) cases.

-- 
Bart


More information about the lazarus mailing list