Reposting this abomination from my Reddit Account because this is important information. Uncle Bob would be proud.

  • Posts
    link
    fedilink
    arrow-up
    8
    ·
    2 years ago

    Well now I just wanna see more for-loop one-liners!

    • lwhjp@lemmy.sdf.org
      link
      fedilink
      arrow-up
      4
      ·
      2 years ago

      There’s always the classic C strcpy :)

      char *strcpy(char *dest, char *src) {
          char *p = dest;
          while (*p++ = *src++);
          return dest;
      }