wctomb.3int
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3INT 代码 · 共 62 行
3INT
62 行
.TH wctomb 3int.SH Namewctomb \- converts a character of type wchar_tto a multibyte character..SH Syntax#include <stdlib.h>.PPint wctomb \fI(s, wchar)\fR.brchar\fI *s;\fR.brwchar_t\fI wchar;\fR.SH Arguments.TP 8.I sThe.I sargument is a pointer to the resulting multibyte character object..PP.TP 8.I wcharThe .I wcharargument is a value of typewchar_t..SH Description.NXR "wide character to multibyte character conversion function"The .PN wctomb() function determines the number of bytesneeded to represent the multibyte character corresponding to the charactercode of type wchar_t whose value is \fIwchar\fR.It stores themultibyte character representationin the array object pointed to by \fIs\fR (if \fIs\fR is not a null pointer).At most MB_CUR_MAX characters are stored.This function is affected by the LC_CTYPE category of thecurrent locale..SH Return ValueIf \fIs\fR is a null pointer, the .PN wctomb() function returns a zero value.If \fIs\fR is not a null pointer, the .PN wctomb() function returns:.RS 3.IP \(bu 3 - -1, if the valueof \fIwchar\fR does not correspondto a valid multibye character.IP \(bu 3 The number of bytes that comprise the multibyte character correspondingto the value of \fIwchar\fR. In no case is the value returned greater than the value of the MB_CUR_MAX macro..RE.SH See Alsomblen(3int), mbtowc(3int), mbstowcs(3int), setlocale(3int),wcstombs(3int)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?