code: drawterm

ref: 37ef30916cf30b47f92cf8f815caa23424263a5a
dir: /libc/runestrdup.c/

View raw version
#include <u.h>
#include <libc.h>

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

	ns = malloc(sizeof(Rune)*(runestrlen(s) + 1));
	if(ns == 0)
		return 0;

	return runestrcpy(ns, s);
}