wcstombs.3int
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3INT 代码 · 共 68 行
3INT
68 行
.TH wcstombs 3int.SH Namewcstombs \- converts a string of type wchar_t into a multibyte character string.SH Syntax#include <stdlib.h>.PPint wcstombs \fI(s, pwcs, n)\fR.brchar \fI*s;\fR.brconst wchar_t\fI *pwcs;\fR.brsize_t\fI n;\fR.SH Arguments.TP 8.I sThe .I sargument is a pointer to the resulting multibyte character string..PP.TP 8.I pwcsThe.I pwcsargument is a pointer to the source array of wide characters..PP.TP 8.I nThe.I n argument is the maximum number of resulting bytes in the array pointed to by .I s..SH Description.NXR "wide character string to multibyte character string conversion function"The .PN wcstombsfunction converts a sequence of character codes of type .PN wchar_tfrom the array pointed to by \fIpwcs\fRinto a sequence of multibyte characters. The.PN wcstombsfunction stores the multibytecharacters in the array pointed to by \fIs\fR, stopping ifa multibytecharacter would exceed the limit of \fIn\fR total bytes or if a null character is stored. Each character is converted as if by a call to the .PN wctombfunction. No more than \fIn\fRbytes are modified in the array pointedto by \fIs\fR.This function is affected by the LC_CTYPE category of thecurrent locale..SH Return ValuesIf a character is encountered that does not correspond to a valid multi-byte character, the .PN wcstombs function returns .PN (size_t) -1.Otherwise,the .PN wcstombsfunction returns the number of bytes modified, notincluding a terminating null character, if any. The array willnot be null-terminated if the value returned is \fIn\fR..SH See Alsomblen(3int), mbtowc(3int), mbstowcs(3int), setlocale(3int),wctomb(3int)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?