;Usage: /hints <text here>
;Example: /hints o lk abc defh ijklm nopqrs tuvwxyz
;Return: o l* a** d*** i**** n***** t******
;Return: * ** *** **** **k** **pq** ***w***
;Return: o *k **c ***h ****m *****s ******z
;Note: If the length of the word is smaller than 4 it only shows
;the First and Last letters, otherwise it shows the First, Last
;AND the middle letter.
alias hints {
var %r = $1-
echo -a $hint(%r).s
.timerhint2 1 1 echo -a $hint(%r).m
.timerhint3 1 2 echo -a $hint(%r).f
}
alias hint {
var %i 1
while $gettok($1,%i,32) {
var %z = $gettok($1,%i,32),%p = $calc(($len(%z)+1)/2),%o = $str(*,$calc($floor(%p) -1)) $+ $mid(%z,%p,$iif(*.5 iswm %p,2,1))
var %r = %r $iif($prop == s,$left(%z,1) $+ $str(*,$calc($len(%z)-1)),$iif($prop == f,$str(*,$calc($len(%z)-1)) $+ $right(%z,1),$iif($prop == m,$iif($len(%z) > 4,%o $+ $str(*,$calc($len(%z) - $len(%o))),$str(*,$len(%z))))))
inc %i
}
return %r
}