OK. Perhaps I could just look for a string with a number in it? Richard On 12 Mar 2014 14:05, "silvioprog" <silviop...@gmail.com> wrote:
> 2014-03-12 10:53 GMT-03:00 Richard Mace <richard.m...@gmail.com>: > >> Hi, >> I am trying to check to make sure the a string contains at least 1 >> uppercase character, 1 lowercase character and 1 number. >> Any ideas as of the best way of coding this? >> > > 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". > > 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. > > -- > Silvio Clécio > My public projects - github.com/silvioprog > > -- > _______________________________________________ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > >
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus