Switch to edit mode.
Name(s): from_morse1: {s} = args
2: result = ""
3: s = strsub(s, "_", "-")
4: for x in ($string_utils:explode(s, " "))
5: for y in ($string_utils:words(x))
6: i = y in this.morse_table
7: if (i)
8: result = tostr(result, $string_utils:lowercase($string_utils.ascii[i]))
9: else
10: result = tostr(result, y)
11: endif
12: endfor
13: result = tostr(result, " ")
14: endfor
15: if (result)
16: return result[1..$ - 1]
17: else
18: return ""
19: endif
20: "Last modified by manta (#7165) on Sun Sep 3 08:05:28 2000 MDT."
21: "This verb previously owned by manta (#7165), and chowned to $slacker upon dewizarding (Sat Aug 17 14:50:05 2002 MDT)."
22: "Last modified by Dax (#789) on Sat Aug 17 14:50:05 2002 MDT."