#include <9pm/u.h>
#include <9pm/libc.h>
#include <9pm/String.h>

String*
s_unique(String *s)
{
	String *p;

	if(s->ref > 1){
		p = s;
		s = s_clone(p);
		s_free(p);
	}
	return s;
}


syntax highlighted by Code2HTML, v. 0.9.1