Skip to content

Instantly share code, notes, and snippets.

@but0n
Created December 11, 2016 10:42
Show Gist options
  • Save but0n/4e925f25af3f325e4f42001915de0f4c to your computer and use it in GitHub Desktop.
Save but0n/4e925f25af3f325e4f42001915de0f4c to your computer and use it in GitHub Desktop.
记事本
@but0n
Copy link
Author

but0n commented Dec 17, 2016

void *memcpy(void *dst, const void *src, unsigned n) {
	const char *p = src;
	char *q = dst;

	while (n--) {
		*q++ = *p++;
	}

	return dst;
}

@but0n
Copy link
Author

but0n commented Dec 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment