unincpy

Copies a specified number of characters from one string to another

Local Servers:nonblocking
Remote Servers:N/A
NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows95, Windows 98
Library:Cross-Platform Localization (LOC*.*)
Service:Unicode

Syntax

   #include <unicode.h> 
    
   N_EXTERN_LIBRARY(punicode) unincpy  ( 
      punicode              s1,  
      const unicode N_FAR  *s2,  
      size_t                n);
   

Pascal Syntax

   uses netwin32 
    
   Function unincpy 
     (s1 : punicode;         
      s2 : const unicode;        
      n  : size_t            
   ) : punicode;
   

Parameters

s1
(OUT) Points to the destination string.
s2
(IN) Points to the source string.
n
(IN) Specifies the maximum length in characters (not bytes).

Return Values

Returns a pointer to s1.

Remarks

unincpy copies up to the number of characters specified by the n parameter from the source string in the s2 parameter to the destination string in the s1 parameter and truncates the s1 parameter if necessary. The destination string in the s1 parameter might not be null-terminated if the length of the s2 parameter is the number of characters specified by the n parameter or more.

Win32 clients call wcsncpy which pads any remaining space in the buffer with nulls. Non-Win32 clients do not NULLl-pad the output buffer.

unincpy corresponds to the C strncpy function.

For sample code, see Section 3.22, Example: unipcpy.

See Also

unicpy, unipcpy