Advertisement
BobMe

THING

Nov 21st, 2019
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. local input = "Frickle frackle, your mom a crackle. Hippity hoppity, my mom wants more property. Skiddadle skidoodle, I stole your dad's poodle."
  2. --compression vowel thing start idk
  3. local output = ""
  4.  
  5. function isVowel(x)
  6. vowels = {}
  7. vowels["a"] = "a";vowels["e"] = "e";vowels["i"] = "i";vowels["o"] = "o";vowels["u"] = "u";
  8. if vowels[x:lower()] ~= nil then
  9. return false
  10. else
  11. return true
  12. end
  13. end
  14.  
  15. for i=1,#input do
  16. if isVowel(string.sub(input,i,i)) == true then
  17. output = output..string.sub(input,i,i)
  18. end
  19. end
  20.  
  21. print("OUTPUT:\n\n"..output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement