//*****************************************
//函数明 strcpy
//形参char * _szDes , char * _szSrc shall be 0 ended
//返回值是 char *
//*****************************************
char * strcpy(char * _szDes , char * _szSrc)
{
//validate of the arg 。 pointer must be compared to NULL
ASSERT(NULL ! = _szDes && NULL != _szSrc);
//while copy . from _szSrc to _szDes and notice that _szDes cant be overflowed
//because of the returning char pointer there should be a recovery var to flag the start of string array
char * pTmp = _szDes;
while( '/0'= * _szDes )
{
*_szDes ++ = *_szSrc ++;
}
//remember that _szDes shall be 0 ended
return pTmp;
}