]> mj.ucw.cz Git - moe.git/blob - ucw/alloc_str.c
Isolate: Cleanups, configuration and TODO
[moe.git] / ucw / alloc_str.c
1 /*
2  *      UCW Library -- String Allocation
3  *
4  *      (c) 1997 Martin Mares <mj@ucw.cz>
5  *
6  *      This software may be freely distributed and used according to the terms
7  *      of the GNU Lesser General Public License.
8  */
9
10 #include "ucw/lib.h"
11
12 #include <string.h>
13
14 char *
15 xstrdup(const char *s)
16 {
17   uns l = strlen(s) + 1;
18   return memcpy(xmalloc(l), s, l);
19 }