git: 9front

ref: 5cd5d8899f0ca0f3d9c6b56d7feabfa0729df88c
dir: /sys/src/cmd/unix/drawterm/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);
}