#include
char* m_strcpy(char* dst, const char* src, int m)
{
char* ret = NULL;
if (m > 0)
{
ret = dst;
src += m;
if ((NULL != dst) (NULL != src))
while ((*dst++ = *src++) != '');
}
return ret;
}
int main()
{
char* p1 = "Hello world";
char p2[20];
m_strcpy(p2, p1, 6); //从"w"拷贝到结束!
printf(p2);
return 0;
}