fork download
  1. Rules = {
  2. 'A' => '4',
  3. 'B' => '6',
  4. 'E' => '3',
  5. 'I' => '1',
  6. 'L' => '1',
  7. 'M' => '(V)',
  8. 'N' => '(\)',
  9. 'O' => '0',
  10. 'S' => '5',
  11. 'T' => '7',
  12. 'V' => '\/',
  13. 'W' => '`//',
  14. }
  15.  
  16. def eng_to_l33t(input)
  17. input_array = input.upcase.split("")
  18. input_array.each do |char|
  19. begin
  20. print Rules.fetch(char)
  21. rescue
  22. print char
  23. next
  24. end
  25. end
  26. end
  27.  
  28. eng_to_l33t('hentai')
Success #stdin #stdout 0s 28984KB
stdin
Standard input is empty
stdout
H3(\)741