Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man3c/mbstowcs.3c
Real path: /usr/share/man/man3c/mbstowcs.3c
Zurück
'\" te .\" Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. .TH mbstowcs 3C "11 Jun 2018" "Oracle Solaris 11.4" "Standard C Library Functions" .SH NAME mbstowcs \- convert a character string to a wide-character string .br mbstowcs_s \- convert a character string to a wide-character string with additional safety checks .SH SYNOPSIS .LP .nf #include <stdlib.h> size_t mbstowcs(wchar_t *restrict \fIpwcs\fR, const char *restrict \fIs\fR, size_t \fIn\fR); .fi .LP .nf #define __STDC_WANT_LIB_EXT1__ 1 #include <stdlib.h> errno_t mbstowcs_s(size_t *restrict \fIretval\fR, wchar_t *restrict \fIdst\fR, rsize_t \fIdstmax\fR, const char *restrict \fIsrc\fR, rsize_t \fIlen\fR); .fi .SH DESCRIPTION .sp .LP The \fBmbstowcs()\fR function converts a sequence of characters from the array pointed to by \fIs\fR into a sequence of corresponding wide-character codes and stores not more than \fIn\fR wide-character codes into the array pointed to by \fIpwcs\fR. No characters that follow a null byte (which is converted into a wide-character code with value \fB0\fR) will be examined or converted. Each character is converted as if by a call to \fBmbtowc\fR(3C). .sp .LP No more than \fIn\fR elements will be modified in the array pointed to by \fIpwcs\fR. If copying takes place between objects that overlap, the behavior is undefined. .sp .LP The behavior of this function is affected by the \fBLC_CTYPE\fR category of the current locale. If \fIpwcs\fR is a null pointer, \fBmbstowcs()\fR returns the length required to convert the entire array regardless of the value of \fIn\fR, but no values are stored. .sp .LP The \fBmbstowcs_s()\fR function is part of the bounds checking interfaces specified in the C11 standard, Annex K. It is similar to the \fBmbstowcs()\fR function, but with differing parameters and explicit runtime-constraints as defined in the C11 standard. See \fBruntime_constraint_handler\fR(3C) and INCITS/ISO/IEC 9899:2011. .SH RETURN VALUES .sp .LP If an invalid character is encountered, \fBmbstowcs()\fR returns (\fBsize_t\fR)\fB\(mi1\fR and may set \fBerrno\fR to indicate the error. Otherwise, \fBmbstowcs()\fR returns the number of the array elements modified (or required if \fIpwcs\fR is \fBNULL),\fR not including a terminating \fB0\fR code, if any. The array will not be zero-terminated if the value returned is \fIn\fR. .sp .LP If no runtime-constraint violation and no encoding error occurred, \fBmbstowcs_s()\fR returns zero. Otherwise, \fBmbstowcs_s()\fR returns a nonzero value. .SH ERRORS .sp .LP The \fBmbstowcs()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBEILSEQ\fR\fR .ad .RS 10n .rt Invalid byte sequence is detected. .RE .sp .LP The \fBmbstowcs_s()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt Null pointer is passed. .RE .sp .ne 2 .mk .na \fB\fBERANGE\fR\fR .ad .RS 10n .rt \fBsize\fR argument is not a valid value. .RE .sp .ne 2 .mk .na \fB\fBEILSEQ\fR\fR .ad .RS 10n .rt Invalid byte sequence is detected. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ CSI Enabled _ Interface Stability Committed _ MT-Level See below _ Standard See \fBstandards\fR(7). .TE .sp .sp .LP The \fBmbstowcs()\fR function can be used safely in multithreaded applications. .sp .LP The \fBmbstowcs_s()\fR function cannot be used safely in a multithreaded application due to the runtime constraint handler. For more information, see the \fBruntime_constraint_handler\fR(3C) man page. .SH SEE ALSO .sp .LP \fBsetlocale\fR(3C), \fBmblen\fR(3C), \fBmbtowc\fR(3C), \fBwcstombs\fR(3C), \fBwctomb\fR(3C), \fBattributes\fR(7), \fBstandards\fR(7), \fBwcstombs_s\fR(3C), \fBwctomb_s\fR(3C), \fBruntime_constraint_handler\fR(3C)