]> git.lizzy.rs Git - uwu-lang.git/blob - common/str.h
fc5f587d202ba1e6f13a5d5634afad85b0e6f4fa
[uwu-lang.git] / common / str.h
1 #ifndef _COMMON_STR_H_
2 #define _COMMON_STR_H_
3
4 #include <stdio.h>
5 #include <stdarg.h>
6
7 static inline char *asprintf_wrapper(const char *format, ...)
8 {
9         va_list args;
10         va_start(args, format);
11         char *ptr;
12         vasprintf(&ptr, format, args);
13         va_end(args);
14         return ptr;
15 }
16
17 #endif