RKCVTZEN(3)
π RKCVTZEN(3) π
okay bestie, so this one is RkCvtZen, a lil function from the Library Functions Manual, and it's literally here to glow up your ASCII and your single-width katakana into full-on double-width characters. the way that it just does that?? iconic. β¨
πΈ NAME πΈ
RkCvtZen β convert ASCII characters and single-width katakana to double-width characters
like. that's the whole job. no cap. π
π SYNOPSIS π
#include <canna/RK.h>
int RkCvtZen(dst, maxdst, src, srclen)
unsigned char *dst;
int maxdst;
unsigned char *src;
int srclen;
π¦ DESCRIPTION π¦
so here's the tea, bestie π β RkCvtZen takes the srclen bytes of ASCII character and single-width katakana data and converts them to double-width character, starting at the area src. she's giving makeover energy, fr fr.
a couple things you need to know before you go in:
- a null character in
srcis not interpreted as the end of the string. like, she does not stop at null. she keeps going. periodt. - the conversion result gets stored in the area
dst. π₯ - characters that are not subject to conversion are copied as they are β no edits, no notes, just vibes. β¨
- the conversion result is truncated to adjust to character boundaries in the EUC code when its byte length exceeds
maxdst -1. so if you under-budget your destination, she's trimming to keep things clean at the boundaries. dstis padded with null characters at the end if possible. π«Ά- EUC code is used to represent both
srcanddst. iykyk.
and then the plot twist π βNULLcan be specified indst. and when you do that,NULLoverrides the entire conversion result. literally nothing gets written out. the whole thing. gone. so don't do that unless that's what you meant, bestie.
π RETURN VALUE π
this function returns the byte length of the conversion result. π
or β and hear me out β it returns 0 if the value of maxdst is invalid. so if you get a zero back, that's the vibe check failing, not a successful empty conversion. π
π SEE ALSO π
not gonna lie, this page doesn't list any SEE ALSO references, so we're just gonna sit here and be cute together. π
and that's the whole page, babe! this one came out of the Library Functions Manual as RKCVTZEN(3) β mwah, mwah, take care of her, and remember: valid maxdst, non-NULL dst, and she'll slay every single time. π
πβ¨
π¦ where this page comes from
- debian bookworm: libcanna1g-dev 3.7p3-20 Β· ISC
- debian trixie: libcanna1g-dev 3.7p3-25 Β· ISC
- ubuntu jammy: libcanna1g-dev 3.7p3-17 Β· ISC
- ubuntu noble: libcanna1g-dev 3.7p3-20 Β· ISC
- ubuntu questing: libcanna1g-dev 3.7p3-26
- ubuntu resolute: libcanna1g-dev 3.7p3-26build1 Β· ISC
- ubuntu stonking: libcanna1g-dev 3.7p3-29 Β· ISC
- Copyright 1994 NEC Corporation, Tokyo, Japan
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms