RKCVTKANA(3)

πŸ’– NAME πŸ’–

RkCvtKana β€” turns double-width hiragana into double-width katakana ✨ literally that's the whole job and she does it flawlessly


πŸŽ€ SYNOPSIS πŸŽ€

#include <canna/RK.h>
int RkCvtKana(dst, maxdst, src, srclen)
unsigned char *dst;
int maxdst;
unsigned char *src;
int srclen;

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so RkCvtKana takes srclen bytes of double-width hiragana data and converts them into double-width katakana, starting at the area src. 🌸

heads up bestie: a null character inside src is not interpreted as the end of the string. nope, not today. the function just keeps going for the full srclen bytes, no cap.

the conversion result gets stored in the area dst. characters that aren't subject to conversion are copied over as they are β€” no glow-up for them, they stay exactly how they came in πŸ’…

here's the tea on the byte math: when the byte length of the result exceeds maxdst -1, the conversion result is truncated so it lines up with character boundaries in the EUC code. 🫢 and dst gets padded with null characters at the end if possible.

EUC code is the vibe for representing both src and dst. periodt.

one more thing: NULL can be specified in dst. and NULL overrides the entire conversion result β€” like, the whole thing, gone, main character energy only. 😭

⭐ RETURN VALUE ⭐

this function returns the byte length of the conversion result πŸ‘‘

and it returns 0 if the value of maxdst is invalid. so if you get a zero back, that's your vibe check failing fr fr πŸ’€


🌈 SEE YA 🌈

this lil page is living in the Library Functions Manual, and its tag is RKCVTKANA(3) πŸŽ€ ty for reading bestie, go convert some kana, you ate πŸ’…βœ¨

πŸ“¦ where this page comes from