DragonFly On-Line Manual Pages

Search: Section:  

RKCVTHAN(3)           DragonFly Library Functions Manual           RKCVTHAN(3)


RRkkCCvvttHHaann / RRkkwwCCvvttHHaann - convert double-width symbols, alphanumeric characters, hiragana, and katakana to single-width characters


##iinncclluuddee <<ccaannnnaa//RRKK..hh>> iinntt RRkkCCvvttHHaann((ddsstt,, mmaaxxddsstt,, ssrrcc,, ssrrcclleenn)) uunnssiiggnneedd cchhaarr **ddsstt;; iinntt mmaaxxddsstt;; uunnssiiggnneedd cchhaarr **ssrrcc;; iinntt ssrrcclleenn;; iinntt RRkkwwCCvvttHHaann((ddsstt,, mmaaxxddsstt,, ssrrcc,, ssrrcclleenn)) wwcchhaarr__tt **ddsstt;; iinntt mmaaxxddsstt;; wwcchhaarr__tt **ssrrcc;; iinntt ssrrcclleenn;;


RkCvtHan converts the srclen bytes of double-width symbol, alphanumeric characters, hiragana, and katakana data to single-width characters, starting at the area src. A null character in src is not interpreted as the end of the string. The conversion result is stored in the area dst. Characters that are not subject to conversion are copied as they are. The conversion result is truncated to adjust to character boundaries in the EUC code when its byte length exceeds maxdst -1. dst is padded with null characters at the end if possible. EUC code is used to represent both src and dst. RkwCvtHan is the wchar_t version of RkCvtHan. Arguments which specify the length are regarded as they count the character length instead of byte length. NNUULLLL can be specified in dst. NNUULLLL overrides the entire conversion result.


This function returns the byte length (or character length for RkwCvtHan) of the conversion result, or returns 00 if the value of maxdst is invalid. RKCVTHAN(3)

Search: Section: