Last active
May 8, 2018 09:36
-
-
Save Siphonay/2b9f16e3ac69ae334cf31f67a23c7f31 to your computer and use it in GitHub Desktop.
Widetooter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
abort "please write your string as an argument" unless ARGV[0] | |
puts ARGV.join(' ').gsub(/[^a-z \n]/i, '').chars.map { |letter| | |
if letter.ord.between? 'a'.ord, 'z'.ord then | |
letter = " :#{letter}_wide:" | |
else | |
letter = letter | |
end }.join | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment