plan9port/src/libString/s_unique.c
2003-12-11 18:15:57 +00:00

16 lines
173 B
C

#include <u.h>
#include <libc.h>
#include "libString.h"
String*
s_unique(String *s)
{
String *p;
if(s->ref > 1){
p = s;
s = s_clone(p);
s_free(p);
}
return s;
}