Created
April 25, 2017 21:11
-
-
Save errorseven/50ed8e2b3bad7fbe13188f4a6c0b829d to your computer and use it in GitHub Desktop.
Reddit/r/dailyprogrammer - [2017-04-24] Challenge #312 [Easy] L33tspeak Translator
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
Chalinput := | |
( | |
"I am elite. | |
Da pain! | |
Eye need help! | |
3Y3 (\)33d j00 t0 g37 d4 d0c70r. | |
1 n33d m4 p1llz!" | |
) | |
for e, line in StrSplit(Chalinput, "`n", "`r") | |
r .= line " -> " (line ~= "[37(4)016\/]" ? l33t(line, 1) | |
: l33t(line)) "`n" | |
msgbox % clipboard := r | |
l33t(line, y:=0) { | |
leet := { A: "4", B: "6", E: "3", I: "1", L: "1", M: "(V)" | |
, N: "(\)", O: "0", S: "5", T: "7", V: "\/", W: "``//"} | |
for key, char in leet | |
line := Format("{:L}", StrReplace(line, (y ? char : key) | |
, (y ? key : char))) | |
return line | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment