daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest Oct 11th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5.     "strings"
  6.  
  7.     "github.com/cespare/argf"
  8. )
  9.  
  10. var alphamoji = map[rune]string{
  11.     'a': "🅰",
  12.     'b': "🅱️",
  13.     'c': "©",
  14.     'd': "🇩",
  15.     'e': "📧",
  16.     'f': "🎏",
  17.     'g': "⛽",
  18.     'h': "♓",
  19.     'i': "ℹ",
  20.     'j': "🗾",
  21.     'k': "🎋",
  22.     'l': "👢",
  23.     'm': "Ⓜ",
  24.     'n': "♑",
  25.     'o': "⭕",
  26.     'p': "🅿",
  27.     'q': "🇶",
  28.     'r': "Ⓡ",
  29.     's': "⚡",
  30.     't': "🌴",
  31.     'u': "⛎",
  32.     'v': "♈",
  33.     'w': "🇼",
  34.     'x': "❌",
  35.     'y': "✌",
  36.     'z': "🇿",
  37. }
  38.  
  39. func main() {
  40.     for argf.Scan() {
  41.         line := argf.String()
  42.         line = strings.ToLower(line)
  43.  
  44.         for _, c := range line {
  45.             if emoji, ok := alphamoji[c]; ok {
  46.                 fmt.Print(emoji)
  47.             } else {
  48.                 fmt.Printf("%c", c)
  49.             }
  50.         }
  51.  
  52.         fmt.Println()
  53.     }
  54. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top