Hangul resyllabification by yuyarin

n;char*p;d(){n=((*p&15)<<4|(p[1]&60)/4)*256+((p[1]&3)<<6|(p[2]&63))-44032;}e(){n+=44032;*p++=224|n>>12&15;*p++=128|n>>6&63;*p++=128|n&63;}main(f,s){for(;p=gets(s);puts(s))e(n=n%588+(f<9?f/2+f/8:f-10+f/23)*588,d(e(n-=f=n%588%28,d())));}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page