c32rtomb(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

c32rtomb(3c)

c32rtomb(3C)             Standard C Library Functions             c32rtomb(3C)

NAME
       c32rtomb - restartable multibyte/wide character conversion function

SYNOPSIS
       #include <uchar.h>

       size_t c32rtomb(char * restrict s, char32_t c32,
                       mbstate_t * restrict ps);

DESCRIPTION
       If s is not a null pointer, the c32rtomb() function determines the num‐
       ber  of  bytes  needed to represent the multibyte character that corre‐
       sponds to the wide character given by  c32  (including  any  shift  se‐
       quences),  and stores the multibyte character representation in the ar‐
       ray whose first element is pointed to by s. At  most  MB_CUR_MAX  bytes
       are  stored.  If  c32  is a null wide character, a null byte is stored,
       preceded by any shift sequence needed  to  restore  the  initial  shift
       state; the resulting state described is the initial conversion state.


       If  s  is  a null pointer, the c32rtomb() function is equivalent to the
       call c32rtomb(buf, L' ', ps) where buf is an internal buffer.

RETURN VALUES
       The c32rtomb() function returns the number of bytes stored in the array
       object (including any shift sequences). When c32 is not  a  valid  wide
       character,  an  encoding error occurs: the function stores the value of
       the macro EILSEQ in errno  and  returns  (size_t)(-1);  the  conversion
       state is unspecified.

ERRORS
       The c32rtomb() function will fail if:

       EINVAL    The  ps argument points to an object that contains an invalid
                 conversion state.


       EILSEQ    Invalid character sequence is detected.



       The c32rtomb() function may fail if:

       ENOMEM    Insufficient storage space is available.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE  VALUE  _  Interface  StabilityCommitted  _ MT-LevelSee below _
       StandardC11


   MT-Level
       If ps is not a null pointer, the function  uses  the  mbstate_t  object
       pointed  to  by ps and the function can be used safely in multithreaded
       applications. If ps is a null pointer, the function uses  its  internal
       mbstate_t  object  and the function is Unsafe in multithreaded applica‐
       tions.

SEE ALSO
       mbsinit(3C), setlocale(3C), attributes(7), standards(7)


       Handling Characters and Character Strings in Internationalizing and Lo‐
       calizing Applications in Oracle Solaris

HISTORY
       The c32rtomb() function was added to  Solaris  in  the  Oracle  Solaris
       11.4.0 release.

Oracle Solaris 11.4               25 Nov 2024                     c32rtomb(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3