Implement untested string and path helpers for easy cross compatability

This commit is contained in:
Aaron Cook 2023-10-26 01:55:20 -05:00
commit 34b1dc2c86
4 changed files with 168 additions and 0 deletions

12
src/bstr.h Normal file
View file

@ -0,0 +1,12 @@
#ifndef _BSTR_H_
#define _BSTR_H_
#include <stdarg.h>
#include <stdio.h>
/* printf onto the end of base, reallocating and returning that buffer
* can provide NULL for no base */
__attribute__((format(printf, 2, 3)))
char *bstr_print(char *base, const char *fmt, ...);
#endif /* _BSTR_H_ */