


Synopsys:
     #include <wchar.h>
     wchar_t	*wmemchr(const wchar_t *S, wchar_t C, size_t N);
   
Description:
The 'wmemchr' function locates the first occurrence of C in the initial
N wide-characters of the object pointed to be S. This function is not
affected by locale and all wchar_t values are treated identically.  The
null wide-character and wchar_t values not corresponding to valid
characters are not treated specially.

   If N is zero, S must be a valid pointer and the function behaves as
if no valid occurrence of C is found.

Returns:
The wmemchr function returns a pointer to the located wide-character,
or a null pointer if the wide-character does not occur in the object.

Portability:
wmemchr is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     int wmemcmp(const wchar_t *S1, const wchar_t *S2, size_t N);
   
Description:
The 'wmemcmp' function compares the first N wide-characters of the
object pointed to by S1 to the first N wide-characters of the object
pointed to by S2. This function is not affected by locale and all
wchar_t values are treated identically. The null wide-character and
wchar_t values not corresponding to valid characters are not treated
specially.

   If N is zero, S1 and S2 must be a valid pointers and the function
behaves as if the two objects compare equal.

Returns:
The wmemcmp function returns an integer greater than, equal to, or
less than zero, accordingly as the object pointed to by S1 is greater
than, equal to, or less than the object pointed to by S2.

Portability:
wmemcmp is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     wchar_t *wmemcpy(wchar_t *D, const wchar_t *S, size_t N);
   
Description:
The 'wmemcpy' function copies N wide-characters from the object pointed
to by S to the object pointed to be D. This function is not affected by
locale and all wchar_t values are treated identically.  The null
wide-character and wchar_t values not corresponding to valid characters
are not treated specially.

   If N is zero, D and S must be a valid pointers, and the function
copies zero wide-characters.

Returns:
The wmemcpy function returns the value of D.

Portability:
wmemcpy is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     wchar_t *wmemmove(wchar_t *D, const wchar_t *S, size_t N);
   
Description:
The 'wmemmove' function copies N wide-characters from the object
pointed to by S to the object pointed to by D. Copying takes place as
if the N wide-characters from the object pointed to by S are first
copied into a temporary array of N wide-characters that does not
overlap the objects pointed to by D or S, and then the N
wide-characters from the temporary array are copied into the object
pointed to by D.

   This function is not affected by locale and all wchar_t values are
treated identically. The null wide-character and wchar_t values not
corresponding to valid characters are not treated specially.

   If N is zero, D and S must be a valid pointers, and the function
copies zero wide-characters.

Returns:
The wmemmove function returns the value of D.

Portability:
wmemmove is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     wchar_t *wmemset(wchar_t *S, wchar_t C, size_t N);
   
Description:
The 'wmemset' function copies the value of C into each of the first N
wide-characters of the object pointed to by S.  This function is not
affected by locale and all wchar_t values are treated identically.  The
null wide-character and wchar_t values not corresponding to valid
characters are not treated specially.

   If N is zero, S must be a valid pointer and the function copies zero
wide-characters.

Returns:
The wmemset functions returns the value of S.

Portability:
wmemset is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     wchar_t *wcscat(wchar_t *S1, const wchar_t *S2);
   
Description:
The 'wcscat' function appends a copy of the wide-character string
pointed to by S2 (including the terminating null wide-character code)
to the end of the wide-character string pointed to by S1.  The initial
wide-character code of S2 overwrites the null wide-character code at
the end of S1. If copying takes place between objects that overlap, the
behaviour is undefined.

Returns:
The wcscat function returns S1; no return value is reserved to
indicate an error.

Portability:
wcscat is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     wchar_t *wcschr(const wchar_t *S, wchar_t C);
   
Description:
The 'wcschr' function locates the first occurrence of C in the
wide-character string pointed to by S. The value of C must be a
character representable as a type wchar_t and must be a wide-character
code corresponding to a valid character in the current locale.  The
terminating null wide-character string.

Returns:
Upon completion, wcschr returns a pointer to the wide-character code,
or a null pointer if the wide-character code is not found.

Portability:
wcschr is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     int wcscmp(const wchar_t *S1, *S2);
   
Description:
The 'wcscmp' function compares the wide-character string pointed to by
S1 to the wide-character string pointed to by S2.

   The sign of a non-zero return value is determined by the sign of the
difference between the values of the first pair of wide-character codes
that differ in the objects being compared.

Returns:
Upon completion, wcscmp returns an integer greater than, equal to or
less than 0, if the wide-character string pointed to by S1 is greater
than, equal to or less than the wide-character string pointed to by S2
respectively.

Portability:
wcscmp is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     int wcscoll(const wchar_t *STRA, const wchar_t * STRB);
   
Description:
'wcscoll' compares the wide-character string pointed to by STRA to the
wide-character string pointed to by STRB, using an interpretation
appropriate to the current 'LC_COLLATE' state.

   The current implementation of wcscoll simply uses wcscmp and
does not support any language-specific sorting.

Returns:
If the first string is greater than the second string, wcscoll
returns a number greater than zero.  If the two strings are equivalent,
wcscoll returns zero.  If the first string is less than the second
string, wcscoll returns a number less than zero.

Portability:
wcscoll is ISO/IEC 9899/AMD1:1995 (ISO C).

 





Synopsys:
     #include <wchar.h>
     wchar_t *wcscpy(wchar_t *S1, const wchar_t *,S2);
   
Description:
The 'wcscpy' function copies the wide-character string pointed to by S2
(including the terminating null wide-character code) into the array
pointed to by S1. If copying takes place between objects that overlap,
the behaviour is undefined.

Returns:
The wcscpy function returns S1; no return value is reserved to
indicate an error.

Portability:
wcscpy is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     size_t wcscspn(const wchar_t *S, wchar_t *SET);
   
Description:
The 'wcscspn' function computes the length of the maximum initial
segment of the wide-character string pointed to by S which consists
entirely of wide-character codes not from the wide-character string
pointed to by SET.

Returns:
The wcscspn function returns the length of the initial substring of
S1; no return value is reserved to indicate an error.

Portability:
wcscspn is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     size_t wcslcat(wchar_t *DST, const wchar_t *SRC, size_t SIZ);
   
Description:
The 'wcslcat' function appends wide-characters from SRC to end of the
DST wide-character string so that the resultant wide-character string
is not more than SIZ wide-characters including terminating null
wide-character code.  A terminating null wide-character is always added
unless SIZ is 0.  Thus, the maximum number of wide-characters that can
be appended from SRC is SIZ - 1. If copying takes place between objects
that overlap, the behaviour is undefined.

Returns:
Wide-character string length of initial DST plus the wide-character
string length of SRC (does not include terminating null
wide-characters).  If the return value is greater than or equal to SIZ,
then truncation occurred and not all wide-characters from SRC were
appended.

Portability:
No supporting OS subroutines are required.

 





Synopsys:
     #include <wchar.h>
     size_t wcslcpy(wchar_t *DST, const wchar_t *SRC, size_t SIZ);
   
Description:
'wcslcpy' copies wide-characters from SRC to DST such that up to SIZ -
1 characters are copied.  A terminating null is appended to the result,
unless SIZ is zero.

Returns:
wcslcpy returns the number of wide-characters in SRC, not including
the terminating null wide-character.  If the return value is greater
than or equal to SIZ, then not all wide-characters were copied from SRC
and truncation occurred.

Portability:
No supporting OS subroutines are required.

 





Synopsys:
     #include <wchar.h>
     size_t wcslen(const wchar_t *S);
   
Description:
The 'wcslen' function computes the number of wide-character codes in
the wide-character string to which S points, not including the
terminating null wide-character code.

Returns:
The wcslen function returns the length of S; no return value is
reserved to indicate an error.

Portability:
wcslen is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     wchar_t *wcsncat(wchar_t *S1, const wchar_t *S2, size_t N);
   
Description:
The 'wcsncat' function appends not more than N wide-character codes (a
null wide-character code and wide-character codes that follow it are
not appended) from the array pointed to by S2 to the end of the
wide-character string pointed to by S1. The initial wide-character code
of S2 overwrites the null wide-character code at the end of S1.  A
terminating null wide-character code is always appended to the result.
If copying takes place between objects that overlap, the behaviour is
undefined.

Returns:
The wcsncat function returns S1; no return value is reserved to
indicate an error.

Portability:
wcsncat is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     int wcsncmp(const wchar_t *S1, const wchar_t *S2, size_t N);
   
Description:
The 'wcsncmp' function compares not more than N wide-character codes
(wide-character codes that follow a null wide-character code are not
compared) from the array pointed to by S1 to the array pointed to by S2.

   The sign of a non-zero return value is determined by the sign of the
difference between the values of the first pair of wide-character codes
that differ in the objects being compared.

Returns:
Upon successful completion, wcsncmp returns an integer greater than,
equal to or less than 0, if the possibly null-terminated array pointed
to by S1 is greater than, equal to or less than the possibly
null-terminated array pointed to by S2 respectively.

Portability:
wcsncmp is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     wchar_t *wcsncpy(wchar_t *S1, const wchar_t *S2, size_t N);
   
Description:
The 'wcsncpy' function copies not more than n wide-character codes
(wide-character codes that follow a null wide-character code are not
copied) from the array pointed to by S2 to the array pointed to by S1.
If copying takes place between objects that overlap, the behaviour is
undefined.

   If the array pointed to by S2 is a wide-character string that is
shorter than N wide-character codes, null wide-character codes are
appended to the copy in the array pointed to by S1, until N
wide-character codes in all are written.

Returns:
The wcsncpy function returns S1; no return value is reserved to
indicate an error.

Portability:
wcsncpy is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     size_t wcsnlen(const wchar_t *S, size_t MAXLEN);
   
Description:
The 'wcsnlen' function computes the number of wide character codes in
the wide character string pointed to by S not including the terminating
L'\0' wide character but at most MAXLEN wide characters.

Returns:
wcsnlen returns the length of S if it is less then MAXLEN, or MAXLEN
if there is no L'\0' wide character in first MAXLEN characters.

Portability:
wcsnlen is GNU extension..  wcsnlen requires no supporting OS
subroutines.

 





Synopsys:
     #include <wchar.h>
     wchar_t *wcspbrk(const wchar_t *S, const wchar_t *SET);
   
Description:
The 'wcspbrk' function locates the first occurrence in the
wide-character string pointed to by S of any wide-character code from
the wide-character string pointed to by SET.

Returns:
Upon successful completion, wcspbrk returns a pointer to the
wide-character code or a null pointer if no wide-character code from
SET occurs in S.

Portability:
wcspbrk is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     wchar_t *wcsrchr(const wchar_t *S, wchar_t C);
   
Description:
The 'wcsrchr' function locates the last occurrence of C in the
wide-character string pointed to by S. The value of C must be a
character representable as a type wchar_t and must be a wide-character
code corresponding to a valid character in the current locale.  The
terminating null wide-character code is considered to be part of the
wide-character string.

Returns:
Upon successful completion, wcsrchr returns a pointer to the
wide-character code or a null pointer if C does not occur in the
wide-character string.

Portability:
wcsrchr is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     size_t wcsspn(const wchar_t *S, const wchar_t *SET);
   
Description:
The 'wcsspn' function computes the length of the maximum initial
segment of the wide-character string pointed to by S which consists
entirely of wide-character codes from the wide-character string pointed
to by SET.

Returns:
The wcsspn() function returns the length S1; no return value is
reserved to indicate an error.

Portability:
wcsspn is ISO/IEC 9899/AMD1:1995 (ISO C).  No supporting OS
subroutines are required.

 





Synopsys:
     #include <wchar.h>
     wchar_t *wcsstr(const wchar_t *BIG, const wchar_t *LITTLE);
   
Description:
The 'wcsstr' function locates the first occurrence in the
wide-character string pointed to by BIG of the sequence of
wide-characters (excluding the terminating null wide-character) in the
wide-character string pointed to by LITTLE.

Returns:
On successful completion, wcsstr returns a pointer to the located
wide-character string, or a null pointer if the wide-character string
is not found.

   If LITTLE points to a wide-character string with zero length, the
function returns BIG.

Portability:
wcsstr is ISO/IEC 9899/AMD1:1995 (ISO C).

 





Synopsys:
     #include <wchar.h>
     int wcswidth(const wchar_t *PWCS, size_t N);
   
Description:
The 'wcswidth' function shall determine the number of column positions
required for n wide-character codes (or fewer than n wide-character
codes if a null wide-character code is encountered before n
wide-character codes are exhausted) in the string pointed to by pwcs.

Returns:
The wcswidth function either shall return 0 (if pwcs points to a null
wide-character code), or return the number of column positions to be
occupied by the wide-character string pointed to by pwcs, or return -1
(if any of the first n wide-character codes in the wide-character
string pointed to by pwcs is not a printable wide-character code).

Portability:
wcswidth has been introduced in the Single UNIX Specification Volume 2
wcswidth has been marked as extension in Single UNIX Specification
Volume 3

 





Synopsys:
     #include <wchar.h>
     int wcwidth(const wchar_t WC);
   
Description:
The 'wcwidth' function shall determine the number of column positions
required for the wide character wc. The application shall ensure that
the value of wc is a character representable as a wchar_t, and is a
wide-character code corresponding to a valid character in the current
locale.

Returns:
The wcwidth function shall either return 0 (if wc is a null
wide-character code), or return the number of column positions to be
occupied by the wide-character code wc, or return -1 (if wc does not
correspond to a printable wide-character code).

   The current implementation of wcwidth simply sets the width of all
printable characters to 1 since newlib has no character tables around.

Portability:
wcwidth has been introduced in the Single UNIX Specification Volume 2
wcwidth has been marked as extension in Single UNIX Specification
Volume 3

