Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ wcsncpy(3C) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

wchar(5)

wcscpy(3C)






       wcsncpy(3C)                                              wcsncpy(3C)


       NAME
             wcsncpy - copy a wide character string with bound

       SYNOPSIS
             #include <wchar.h>
             wchar_t *wcsncpy(wchar_t *ws1,const wchar_t *ws2, size_t n);

       DESCRIPTION
             wcsncpy copies exactly n wide characters, truncating the wide
             string ws2 or adding null wide characters to ws1, if
             necessary.  Wide characters that follow a null wide character
             are not copied.  The result will not be null-terminated if the
             length of ws2 is n or more.  If the array ws2 points to is a
             wide character string that is shorter than n wide characters,
             the copy in the array pointed to by ws1 is padded with null
             wide characters until a total of n wide characters is written.
             This function does not check for an overflow condition of the
             array pointed to by ws1.

          Return Values
             wcsncpy returns ws1.

       USAGE
             Overlapping moves may cause unexpected results because the
             movement of wide characters is implementation-dependent.  If
             there is no  null wide character in the first n wide
             characters of the array pointed to by ws2, the result will not
             be null-terminated.

       REFERENCES
             wchar(5), wcscpy(3C)

















                           Copyright 1994 Novell, Inc.               Page 1








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026