<p dir="ltr">OK. Perhaps I could just look for a string with a number in it?<br>
Richard</p>
<div class="gmail_quote">On 12 Mar 2014 14:05, "silvioprog" <<a href="mailto:silvioprog@gmail.com">silvioprog@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-03-12 10:53 GMT-03:00 Richard Mace <span dir="ltr"><<a href="mailto:richard.mace@gmail.com" target="_blank">richard.mace@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif">
Hi,<br></div><div style="font-family:arial,helvetica,sans-serif">I am trying to check to make sure the a string contains at least 1 uppercase character, 1 lowercase character and 1 number.<br>
</div><div style="font-family:arial,helvetica,sans-serif">Any ideas as of the best way of coding this?</div></div></blockquote><div> </div></div><div>In a function, create three Boolean variables (eg. VContainsUpperCase, VContainsLowerCase, VContainsNumber), make a loop through the string and, the measure that finding the ocurrences, set the respective variable to true. Finally, the result will "Result := VContainsUpperCase and VContainsLowerCase and VContainsNumber".</div>
<div><br></div><div>You can also do this with a set of enums. The function would return the set itself. If you are interested, I can explain how it would be with the set too.<br></div><div><br></div>-- <br>Silvio Clécio<br>
My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>
<br>--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
<br></blockquote></div>