NWLstrbcpy

Copies a locale-sensitive string into the target buffer and NULL-terminates the target string

NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform Localization (LOC*.*)
Service:Internationalization

Syntax

  #include <time.h> or #define NWL_EXCLUDE_TIME 
  #include <stdio.h> or #define NWL_EXCLUDE_FILE 
  #include <nwlocale.h> 
   
  N_EXTERN_LIBRARY(pnstr) NWLstrbcpy  ( 
     pnstr              dest,  
     const nstr N_FAR  *src,  
     size_t             maxlen); 
  
  

Pascal Syntax

  uses netwin32 
   
  Function NWLstrbcpy 
    (dest : pnstr; 
     const src : pnstr; 
     maxlen: size_t 
  ) : pnstr; 
  
  

Parameters

dest
(OUT) Points to the string to copy to.
src
(IN) Points to the string to be copied.
maxlen
(IN) Specifies the maximum number of bytes that may be copied into the target buffer including the NULL terminator.

Return Values

NULL

The dest parameter and/or the src parameter is NULL

non-NULL

Pointer to the dest parameter

Remarks

NWLstrbcpy is similar to the ANSI standard strncpy function, except NWLstrbcpy will not pad the remaining space in the output buffer with zeroes as the strncpy function does.

NWLstrbcpy is similar to the NWstrncpy function, except NWLstrbcpy specifies the maximum bytes (not characters) to copy. NWLstrbcpy will also NULL-terminate the string.

If the source string is greater than or equal to the maxlen parameter in length, only the first n-1 bytes are copied to the target buffer followed by NULL.

NWLstrbcpy will not truncate a double-byte character. If the output buffer is not large enough to hold both bytes of a double-byte character, the string is terminated and neither byte will be copied.

See Also

NWLsetlocale, NWstrncpy