summaryrefslogtreecommitdiff
path: root/sys/src/libc/port/runestrdup.c
blob: 592f6d7cd683d0360413114f0f2fdf3f5338a740 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <u.h>
#include <libc.h>

Rune*
runestrdup(Rune *s)
{
	Rune *ns;

	ns = malloc(sizeof(Rune)*(runestrlen(s) + 1));
	if(ns == 0)
		return 0;
	setmalloctag(ns, getcallerpc(&s));
	return runestrcpy(ns, s);
}