ref: a5738f9f913058e63c48e77e0e01c0ceaa2f1c66
dir: /sys/src/libString/s_reset.c/
#include <u.h>
#include <libc.h>
#include "String.h"
String*
s_reset(String *s)
{
if(s != nil){
s = s_unique(s);
s->ptr = s->base;
*s->ptr = '\0';
} else
s = s_new();
return s;
}
String*
s_restart(String *s)
{
s = s_unique(s);
s->ptr = s->base;
return s;
}