strcpy. McGraw-Hill The Complete Reference Fourth Edition
જાહેરાત
જાહેરાત
C h a p t e r 2 6 : T h e S t r i n g a n d C h a r a c t e r F u n c t i o n s
731
strcpy
#include <cstring> char *strcpy(char * str1, const char *str2);
The strcpy( ) function copies the contents of str2 into str1. str2 must be a pointer to a null-terminated string. The strcpy( ) function returns a pointer to str1.
If str1 and str2 overlap, the behavior of strcpy( ) is undefined.
Related functions are memcpy( ), strchr( ), strcmp( ), and strncmp( ).
strcspn
#include <cstring> size_t strcspn(const char * str1, const char *str2);
The strcspn( ) function returns the length of the initial substring of the string pointed to by str1 that is made up of only those characters not contained in the string pointed to by str2. Stated differently, strcspn( ) returns the index of the first character in the string pointed to by str1 that matches any of the characters in the string pointed to by str2.
Related functions are strrchr( ), strpbrk( ), strstr( ), and strtok( ).
strerror
#include <cstring> char *strerror(int errnum);
The strerror( ) function returns a pointer to an implementation-defined string associated with the value of errnum. Under no circumstances should you modify the string.
strlen
#include <cstring> size_t strlen(const char * str);
The strlen( ) function returns the length of the null-terminated string pointed to by str. The null terminator is not counted.
ડાઉનલોડ કરો
જાહેરાત