1 /*
2  * reimplementation of Daniel Bernstein's unix library.
3  * placed in the public domain by Uwe Ohse, uwe@ohse.de.
4  */
5 #include "stralloc.h"
6 #include "byte.h"
7 
8 int
stralloc_catb(stralloc * sa,const char * str,unsigned int len)9 stralloc_catb (stralloc * sa, const char *str, unsigned int len)
10 {
11 	if (!stralloc_readyplus (sa, len + 1))
12 		return 0;
13 	byte_copy (sa->s + sa->len, len, str);
14 	sa->len += len;
15 	sa->s[sa->len] = 'Z'; /* djb */
16 	return 1;
17 }
18