本文共 824 字,大约阅读时间需要 2 分钟。
- char *strcpy(char *strDest, const char *strSrc);
- {
- assert((strDest!=NULL) && (strSrc !=NULL));
- char *address = strDest;
- while( (*strDest++ = * strSrc++) != ‘/0’ )
- NULL ;
- return address ;
- }
- char * my_strncpy( char * dest, const char * source, int count )
- {
- char *p = dest;
- while (count && (*p++ = *source++)) count--;
- while(count--)
- *p++ = '/0';
- return(dest);
- }
转载地址:http://xdgxi.baihongyu.com/