C - StrCat: Copy the string t to the end of s

分享一个大牛的人工智能教程。零基础!通俗易懂!风趣幽默!希望你也加入到人工智能的队伍中来!请点击http://www.captainbed.net

/*
 * StrCat: Copy the string t to the end of s.
 *
 * StrCat.c - by FreeMan
 */

void StrCpy(char *s, char *t)
{
	while (*s++ = *t++);
}

void StrCat(char *s, char *t)
{
	while (*s)
	{
		++s;
	}
	StrCpy(s, t);
}

猜你喜欢

转载自blog.csdn.net/chimomo/article/details/114589603
今日推荐