flatten 20260225

This commit is contained in:
Timothy Prepscius
2026-02-25 12:43:06 -05:00
commit 996151a56a
521 changed files with 46722 additions and 0 deletions

21
tjp/core/string/sxprintf.h Executable file
View File

@@ -0,0 +1,21 @@
// License: Modified MIT (NON-AI)
// See the LICENSE file in the root directory for license information.
// Copyright 2025 Timothy Prepscius
#pragma once
#include <cstdio>
#include <type_traits>
namespace tjp::core {
template<typename T, typename ... Args>
void sxprintf(T &t, const char *format, Args &&... args)
{
static_assert(std::is_array<T>::value, "T must be an array");
static_assert(std::is_same<typename std::remove_all_extents<T>::type, char>::value, "T must be an array of char");
snprintf(t, std::size(t), format, std::forward<Args>(args)...);
}
} // namespace