Guest User

Untitled

a guest
Apr 15th, 2018
251
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on checkBadWords(tString)
  2. tBadWords = field("badwords")
  3. tNewString = ""
  4. tNumOfWords = the number of words in tString
  5. index = 1
  6. repeat while index <= tNumOfWords
  7. if checkWord(tString.word[index]) then
  8. nothing()
  9. else
  10. tNewString = tNewString && tString.word[index]
  11. end if
  12. index = 1 + index
  13. end repeat
  14. return(tNewString)
  15. exit
  16. end
  17.  
  18. on checkWord(tWord)
  19. tBadWords = field("badwords")
  20. repeat while not isChar(tWord.char[1])
  21. if the number of char in tWord > 0 then
  22. delete char 1 of tWord
  23. end if
  24. end repeat
  25. tLen = the number of chars in tWord
  26. if tLen > 0 then
  27. repeat while not isChar(tWord.char[the number of chars in tWord])
  28. delete char (the number of chars in tWord) of tWord
  29. end repeat
  30. end if
  31. index = 1
  32. repeat while index <= the number of word in tBadWords
  33. if tWord = tBadWords.word[index] then
  34. return(1)
  35. else
  36. nothing()
  37. end if
  38. index = 1 + index
  39. end repeat
  40. return(0)
  41. exit
  42. end
  43.  
  44. on isChar(tChar)
  45. if charToNum(tChar) >= 65 and charToNum(tChar) <= 90 then
  46. return(1)
  47. else
  48. if charToNum(tChar) >= 97 and charToNum(tChar) <= 122 then
  49. return(1)
  50. else
  51. if charToNum(tChar) >= 48 and charToNum(tChar) <= 57 then
  52. return(1)
  53. end if
  54. end if
  55. end if
  56. return(0)
  57. exit
  58. end
RAW Paste Data