标签:des style blog ar color sp div log bs
void * Memcpy(void * src, void * des, int len) { char * pSrc, *pDes; if (NULL == des || NULL == src) return NULL; if (src < des && (char*)src + len >(char*)des) { pSrc = (char*)src + len - 1; pDes = (char*)des + len - 1; while (len--) { *pDes-- = *pSrc--; } } else { pSrc = (char*)src; pDes = (char*)des; while (len--) { *pDes++ = *pSrc++; } } return des; }
标签:des style blog ar color sp div log bs
原文地址:http://www.cnblogs.com/jobfindingnotes/p/4116630.html