I realise that this is probably a known thing but my google-fu is not
I am learning Japanese and I wanted to write an application (probably
a web app) that I can paste some Japanese into and highlight the
characters that I should know. To do this I need to take a string of
Japanese, such as “$BL$,3P$a$F$7$^$C$?!#L2$$$N$K!D!#(B” and break it
characters, that is this string contains 16 characters and a space
(despite being 49 bytes long).
Of course some strings also contain latin characters mixed in, such as
“$B26$N2G$H2qOC#2(B | $B$”$M$3(B".
My home-brew solutions always seem to screw up, but then I thought.
This is Ruby! Why the heck am I reinventing the wheel?
So can someone clue me in on how to take a string of Japanese and
break it up into characters?