Advertisement
Fer22f

Script to see missing letters

Jun 17th, 2014
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. ph = [[The quick brown fox jumps over the lazy dog]]
  2.  
  3. ph = string.upper(ph)
  4. s = ""
  5.  
  6. for i=0,25 do
  7.  
  8. c = string.char(65 + i)
  9. f = string.find(ph, c)
  10.  
  11. if (f == nil) then
  12.  s = s .. c .. ", "
  13. end
  14.  
  15. end
  16.  
  17. s = string.sub(s, 0, s:len() - 2)
  18.  
  19. if (s == "") then
  20. print("No letters are missing")
  21. else
  22. print("The letters " .. s .. " are missing")
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement