Hi everybody,

I want to make a "bad-word-list" protection for my application.
The text to compare is a string of several words. I was thinking of
making a repeat-loop going through every word of the strring and compare
it with a linear list using getOne.
But I found out, that getOne (also findPos etc) are case-sensitive. This
brings up a funny thing:

a=["One", "Two", "Three"]
put getPos(a,"Two")
--2
put getPos(a,"two")
--0
put a[2]="two"
--1

So I don't know if this makes sense, but I would have to do another
repeat loop for list comparison.
Second way: using a repeat loop with "contains" like

if badWordCollection contains myBadText.word[i] then doBadStuffHere

but then the word "as" would be bad, if badWordCollection contains "ass"

The next approach is again do a second repeat loop to compare both
strings word by word. I have not tested but since I know that Directors
text management is not really fast...

So any other solutions?

best regards, Florian

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to