*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> strncpy (9r)              
Title
Content
Arch
Section
 

strncpy(9r)

Contents


NAME    [Toc]    [Back]

       strncpy  -  General:  Copies  a  null-terminated character
       string with a specified limit

SYNOPSIS    [Toc]    [Back]

       char * strncpy(
               char *s1,
               char *s2,
               int n );

ARGUMENTS    [Toc]    [Back]

       Specifies a pointer to a  buffer  of  at  least  n  bytes.
       Specifies  a  pointer  to a string (an array of characters
       terminated by a null character).  Specifies the number  of
       characters to be copied.

DESCRIPTION    [Toc]    [Back]

       The  strncpy  routine  copies  string s2 to buffer s1. The
       routine stops copying after it copies a null character  or
       n  characters, whichever comes first.  If the length of s2
       as determined by the null character is less  than  n,  the
       routine pads s1 with null characters.

RETURN VALUES    [Toc]    [Back]

       The  strncpy routine returns a pointer to /NULL at the end
       of the first string (or to the location following the last
       copied  character  if there is no NULL). The copied string
       will not be null terminated if the length of s2 is n characters
 or more.

SEE ALSO    [Toc]    [Back]

      
      
       Routines: bcopy(9r), blkclr(9r), copystr(9r), ovbcopy(9r),
       strcpy(9r)



                                                      strncpy(9r)
[ Back ]
 Similar pages
Name OS Title
strcpy Tru64 General: Copies a null-terminated character string
copyoutstr Tru64 General: Copies a null-terminated string from a kernel address space to a user address space
copyinstr Tru64 General: Copies a null-terminated string from a user address space to a kernel address space
strcmp Tru64 General: Compares two null-terminated character strings
ovbcopy Tru64 General: Copies a byte string with a specified limit
bcopy Tru64 General: Copies a series of bytes with a specified limit
repeat IRIX Concatenates several copies of a string
wcsrtombs NetBSD converts a wide character string to a multibyte character string (restartable)
mbsrtowcs NetBSD converts a multibyte character string to a wide character string (restartable)
copy_to_phys Tru64 General: Copies data from a virtual address to a physical address
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service