Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Kernel Functions for Driversstrcpy(9F)


NAME

 strcpy, strncpy - copy a string from one location to another.

SYNOPSIS

 
#include <sys/ddi.h> 
char *strcpy(char *dst, char *srs);
 char *strncpy(char *dst, char *srs, size_t n);

INTERFACE LEVEL

 

Solaris DDI specific (Solaris DDI).

PARAMETERS

 
dst , srs
Pointers to character strings.
n
Count of characters to be copied.

DESCRIPTION

 

strcpy

 

strcpy() copies characters in the string srs to dst, terminating at the first null character in srs, and returns dst to the caller. No bounds checking is done.

strncpy

 

strncpy() copies srs to dst, null-padding or truncating at n bytes, and returns dst. No bounds checking is done.

RETURN VALUES

 

strcpy() and strncpy() return dst.

CONTEXT

 

strcpy() can be called from user or interrupt context.

SEE ALSO

 

Writing Device Drivers


SunOS 5.9Go To TopLast Changed 11 Apr 1991

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.