#include <stdio.h>
char* strcpy(char *strDest, const char* strSrc)
{
char *p=NULL;
if(strDest == NULL || strSrc == NULL)
{
return NULL;
}
p = strDest;
while((*strDest++ = *strSrc ++) != '\0');
return p;
}
int getStrLen(const char* str)
{
int len = 0;
while( *str ++ != '\0')
{
len ++;
}
return len;
}
void *mymemcpy(void *dst,const void *src,size_t num)
{
assert((dst!=NULL)&&(src!=NULL));
byte * psrc = (byte *)src;//byte 既为unsigned char类型
byte * pdst = (byte *)dst;
while(num-->0)
{
*pdst++ = *psrc++;
}
return dst;
}