Skip to content

Instantly share code, notes, and snippets.

@Siphonay
Last active May 8, 2018 09:36
Show Gist options
  • Save Siphonay/2b9f16e3ac69ae334cf31f67a23c7f31 to your computer and use it in GitHub Desktop.
Save Siphonay/2b9f16e3ac69ae334cf31f67a23c7f31 to your computer and use it in GitHub Desktop.
Widetooter
#!/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