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

川长思鸟来 2022-10-23 08:13 139阅读 0赞

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

  1. /*
  2. * StrCat: Copy the string t to the end of s.
  3. *
  4. * StrCat.c - by FreeMan
  5. */
  6. void StrCpy(char *s, char *t)
  7. {
  8. while (*s++ = *t++);
  9. }
  10. void StrCat(char *s, char *t)
  11. {
  12. while (*s)
  13. {
  14. ++s;
  15. }
  16. StrCpy(s, t);
  17. }

发表评论

表情:
评论列表 (有 0 条评论,139人围观)

还没有评论,来说两句吧...

相关阅读