<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Bart,</p>
<p>I did something similar yesterday:</p>
<p>TMask.InitMaskString(const AValue: String; const CaseSensitive:
Boolean; <b>const UseSets: Boolean = True</b>);<br>
TMask.Create(const AValue: String; const CaseSensitive: Boolean =
False; <b>const UseSets: Boolean = True</b>);<br>
TMaskList.Create(const AValue: String; ASeparator: Char = ';';
const CaseSensitive: Boolean = False; <b>const UseSets: Boolean =
True</b>);</p>
<p>function MatchesMask(const FileName, Mask: String; const
CaseSensitive: Boolean = False; <b>const UseSets: Boolean = True</b>):
Boolean;<br>
function MatchesWindowsMask(const FileName, Mask: String; const
CaseSensitive: Boolean = False; <b>const UseSets: Boolean = False</b>):
Boolean;<br>
function MatchesMaskList(const FileName, Mask: String; Separator:
Char = ';'; const CaseSensitive: Boolean = False; <b>const
UseSets: Boolean = True</b>): Boolean;<br>
function MatchesWindowsMaskList(const FileName, Mask: String;
Separator: Char = ';'; const CaseSensitive: Boolean = False; <b>const
UseSets: Boolean = <i>False</i></b>): Boolean;<br>
</p>
<p>The only code change is in TMask.InitMaskString<br>
- '[': AddCharSet;<br>
+ '[': if fUseSets then<br>
+ AddCharSet<br>
+ else<br>
+ AddChar;<br>
</p>
<p>This works fine.</p>
<p>Easy to implement it as Options. <br>
</p>
<p>Regards,</p>
<p>Rolf<br>
</p>
<div class="moz-cite-prefix">Am 19.03.2020 um 18:37 schrieb Bart via
lazarus:<br>
</div>
<blockquote type="cite"
cite="mid:CAMye31zj-h+HjZSgWMXcWqx9Tfbpkxx-HhhigL1Fgzf5+c4T1Q@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">On Thu, Mar 19, 2020 at 8:25 AM Rolf Wetjen via lazarus
<a class="moz-txt-link-rfc2396E" href="mailto:lazarus@lists.lazarus-ide.org"><lazarus@lists.lazarus-ide.org></a> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">seems that this isn't your favourite option.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Without any context, I cannot comment on this.
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Ok, what's about an additional TMask property to control the useage of
sets (default should be true for Delphi compatibility) and additional
options for the MatchesMask and MatchesWindowsMask functions?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
It's on my ToDo list (as long as other devels don't object to this.
I intend to have an Options property for that, with for now
moCaseSensitive and moDisableSets.
There will be an overloaded constructor TMask,Create((const AValue:
String; ASeparator: Char = ';'; const Options: TMaskOptions = []);
(By default CaseSensitive and DisableSets must be off for backwards
compatibility)
It will only be for trunk and the next stable major release (so it
won't go into fixes branch) anyhow.
</pre>
</blockquote>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /> <table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 18px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virenfrei. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a> </td>
</tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>