Created
July 31, 2016 17:54
-
-
Save ExtReMLapin/437b604cec24273c284e87780785340b to your computer and use it in GitHub Desktop.
This file contains 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
local phonArray = {} | |
phonArray["a"]="ALPHA"; | |
phonArray["b"]="BRAVO"; | |
phonArray["c"]="CHARLIE"; | |
phonArray["d"]="DELTA"; | |
phonArray["e"]="ECHO"; | |
phonArray["f"]="FOXTROT"; | |
phonArray["g"]="GOLF"; | |
phonArray["h"]="HOTEL"; | |
phonArray["i"]="INDIA"; | |
phonArray["j"]="JULIET"; | |
phonArray["k"]="KILO"; | |
phonArray["l"]="LIMA"; | |
phonArray["m"]="MIKE"; | |
phonArray["n"]="NOVEMBER"; | |
phonArray["o"]="OSCAR"; | |
phonArray["p"]="PAPA"; | |
phonArray["q"]="QUEBEC"; | |
phonArray["r"]="ROMEO"; | |
phonArray["s"]="SIERRA"; | |
phonArray["t"]="TANGO"; | |
phonArray["u"]="UNIFORM"; | |
phonArray["v"]="VICTOR"; | |
phonArray["w"]="WHISKEY"; | |
phonArray["x"]="X-RAY"; | |
phonArray["y"]="YANKEE"; | |
phonArray["z"]="ZULU"; | |
phonArray["æ"]="AERLIG"; | |
phonArray["ø"]="OSALSH"; | |
phonArray["å"]="ARING"; | |
phonArray["0"]="ZERO"; | |
phonArray["1"]="ONE"; | |
phonArray["2"]="TWO"; | |
phonArray["3"]="THREE"; | |
phonArray["4"]="FOUR"; | |
phonArray["5"]="FIVE"; | |
phonArray["6"]="SIX"; | |
phonArray["7"]="SEVEN"; | |
phonArray["8"]="EIGHT"; | |
phonArray["9"]="NINER"; | |
phonArray["-"]="[Dash]"; | |
phonArray["."]="[Dot]"; | |
phonArray["@"]="[At]"; | |
phonArray[" "]="[Space]"; | |
phonArray["/"]="[Slash]"; | |
phonArray["#"]="[Hastag]"; | |
phonArray['"']="[Quot]"; | |
phonArray["&"]="[Ampersand]"; | |
phonArray["!"]="[Exclamation mark]"; | |
phonArray['\\']="[Backslash]"; | |
phonArray["?"]="[Question mark]"; | |
phonArray["("]="[Left parenthesis]"; | |
phonArray[")"]="[Right parenthesis]"; | |
phonArray["'"]="[Apostrophe]"; | |
phonArray[","]="[Comma]"; | |
phonArray[":"]="[Colon]"; | |
function string.ToNATO(str, sep) | |
local strout = "" | |
local sep = sep or " " | |
local len = string.len(str) | |
if len == 0 then return "" end | |
local i = 1 | |
while i <= len do | |
if phonArray[str[i]] then | |
strout = strout .. phonArray[str[i]] .. " " | |
end | |
i = i + 1 | |
end | |
return strout | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment