/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
void mymemcpy(char *dst, const char *src, int len)
{
   for(int i = 0; i < len; i++)
   {
      dst[i] = src[i];
   }
}

void mypadmemcpy(char *dst, int dstlen, const char *src, int srclen, char pad)
{
   for(int i = 0; i < srclen; i++)
   {
      dst[i] = src[i];
   }
   for(int i = srclen; i < dstlen; i++)
   {
      dst[i] = pad;
   }
}

