plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

Strprint.c (215B)


      1 #include "std.h"
      2 
      3 int
      4 Strprint(String *s, char *fmt, ...)
      5 {
      6 	va_list ap;
      7 	char *t;
      8 	ulong n;
      9 
     10 	va_start(ap, fmt);
     11 	t = vsmprint(fmt, ap);
     12 	va_end(ap);
     13 	n = strlen(t);
     14 	Stradds(s, Strn(t, n));
     15 	free(t);
     16 	return n;
     17 }