#PHP, 119 bytes
PHP, 119 bytes
foreach(explode(B,$argn)as$i=>$m)($v=$v*16+4*strpos(XIAO,$m[-3]?:B)+strpos(IAOU,$m[-1]?:B))?$i&1||print chr($v&=255):0;
assumes uppercase input. Run as pipe with -nR
or try it online.
requires PHP 7.1
for older PHP, use substr($m,-3,1)
and substr($m,-1)
instead of $m[-<x>]
(+16 bytes);
for younger PHP, put B
, XIAO
and IAOU
in quotes to avoid warning messages (+10 bytes).