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

  • Posts
    link
    fedilink
    arrow-up
    8
    ·
    1 year ago

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

    • Leo Uino@lemmy.sdf.org
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      There’s always the classic C strcpy :)

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