Pull latest DN from Seasight

This commit is contained in:
2025-09-07 22:23:08 +10:00
parent 5c150c08dc
commit 49c8515cb4
9 changed files with 43 additions and 29 deletions
+8 -2
View File
@@ -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;
}
+1
View File
@@ -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)