2 ** strdup.c -- duplicate a string
4 ** This code is Copyright (c) 2002, by the authors of nmh. See the
5 ** COPYRIGHT file in the root directory of the nmh distribution for
6 ** complete copyright information.
14 strdup (const char *str)
22 len = strlen(str) + 1;
23 cp = mh_xmalloc (len);
24 memcpy (cp, str, len);