Pull latest DN from Seasight
This commit is contained in:
@@ -1065,13 +1065,19 @@ DN_API DN_Slice<DN_Str8> DN_Str8Builder_BuildSlice(DN_Str8Builder const *builder
|
||||
return result;
|
||||
}
|
||||
|
||||
DN_API DN_Str8 DN_LStr8_AppendFV(char *buf, DN_USize *buf_size, DN_USize buf_max, char const *fmt, va_list args)
|
||||
{
|
||||
*buf_size += DN_VSNPrintF(buf + *buf_size, DN_CAST(int)(buf_max - *buf_size), fmt, args);
|
||||
DN_Str8 result = DN_Str8_Init(buf, *buf_size);
|
||||
return result;
|
||||
}
|
||||
|
||||
DN_API DN_Str8 DN_LStr8_AppendF(char *buf, DN_USize *buf_size, DN_USize buf_max, char const *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
*buf_size += DN_VSNPrintF(buf + *buf_size, DN_CAST(int)(buf_max - *buf_size), fmt, args);
|
||||
DN_Str8 result = DN_LStr8_AppendFV(buf, buf_size, buf_max, fmt, args);
|
||||
va_end(args);
|
||||
DN_Str8 result = DN_Str8_Init(buf, *buf_size);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -191,6 +191,7 @@ DN_API bool operator== (DN_Str8 const
|
||||
DN_API bool operator!= (DN_Str8 const &lhs, DN_Str8 const &rhs);
|
||||
#endif
|
||||
|
||||
DN_API DN_Str8 DN_LStr8_AppendFV (char *buf, DN_USize *buf_size, DN_USize buf_max, char const *fmt, va_list args);
|
||||
DN_API DN_Str8 DN_LStr8_AppendF (char *buf, DN_USize *buf_size, DN_USize buf_max, char const *fmt, ...);
|
||||
#define DN_IStr8_AppendF(struct_ptr, fmt, ...) DN_LStr8_AppendF((struct_ptr)->data, &(struct_ptr)->size, DN_ArrayCountU((struct_ptr)->data), fmt, ##__VA_ARGS__)
|
||||
#define DN_Str8_FromIStr8(struct_ptr) DN_Str8_Init((struct_ptr)->data, (struct_ptr)->size)
|
||||
|
||||
Reference in New Issue
Block a user