*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: wcsncpy | Section: 3 | Source: Digital UNIX | File: wcsncpy.3.gz
wcsncat(3) Library Functions Manual wcsncat(3) NAME wcsncat, wcsncmp, wcsncpy - Perform operations on wide-character strings with a character count LIBRARY Standard C Library (libc.so, libc.a) SYNOPSIS #include <wchar.h> wchar_t *wcsncat( wchar_t *wcstring1, const wchar_t *wcstring2, size_t number); int wcsncmp( const wchar_t *wcstring1, const wchar_t *wcstring2, size_t number); wchar_t *wcsncpy( wchar_t *wcstring1, const wchar_t *wcstring2, size_t number); STANDARDS Interfaces documented on this reference page conform to industry stan- dards as follows: wcsncat(), wcsncmp(), wcsncpy(): ISO C, XPG4 Refer to the standards(5) reference page for more information about in- dustry standards and associated tags. PARAMETERS Points to a location containing the first wide-character string. Points to a location containing the second wide-character string. Specifies the number of wide characters in the string operation. In wcsncat(), specifies the maximum number of wide characters to append; in wcsncmp(), specifies the maximum number of wide characters to com- pare; and, in wcsncpy, specifies the number of wide characters to copy. DESCRIPTION The wcsncat(), wcsncmp(), and wcsncpy() functions operate on null-ter- minated, wide-character strings. The wcsncat() function appends wide characters from the wcstring2 para- meter to the end of the wcstring1 parameter. The initial character of the wcstring2 parameter overwrites the terminating null wide character of the wcstring1 parameter. The wcsncat() function appends characters until it encounters a null wide character in wcstring2 or appends, at most, the number of characters specified by the value of the number pa- rameter. The function then appends a null wide character to the result and returns wcstring1. When operating on strings stored in fields that overlap, the behavior of this function is unreliable. The wcsncmp() function compares the wide characters in the wcstring1 parameter to the wcstring2 parameter. The wcsncmp() function compares wide characters until it has compared number wide characters or until it has reached a terminating null wide character. The function com- pares, at most, the number of wide characters specified by the value of the number parameter. When operating on strings stored in fields that overlap, the behavior of this function is unreliable. The wcsncmp() function compares strings based on the machine collating order. It does not use the locale-dependent sorting order. Use the wc- scoll() function for locale-dependent sorting. The wcsncpy() function copies wide characters from the wcstring2 para- meter to the wcstring1 parameter and returns wcstring1. The function copies the number of wide characters specified by the value of the num- ber parameter. If wcstring2 is shorter than number characters, wc- string1 is padded out to number characters with null wide characters. However, if there is no null wide character in the first number charac- ters of the wcstring2 array, the result in the wcstring1 array is not null terminated. RETURN VALUES On successful completion, the wcsncat() and wcsncpy() functions return a pointer to the resulting string, wcstring1. On successful completion, the wcsncmp() function returns an integer whose value is greater than 0 (zero) if wcstring1 is greater than wc- string2, returns 0 (zero) if the strings are equivalent, and returns an integer whose value is less than 0 (zero) if wcstring1 is less than wc- string2. No return value is reserved to indicate an error condition for any of these functions. RELATED INFORMATION Functions: strncat(3), wcscat(3), wcschr(3), wcscoll(3), wcslen(3), wc- sspn(3) Standards: standards(5) delim off wcsncat(3)

Navigation Options