diff options
Diffstat (limited to 'c/util.h')
-rw-r--r-- | c/util.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -10,6 +10,13 @@ inline int Swprintf(wchar_t (&buf)[N], const wchar_t* const fmt, T... xs) return _snwprintf_s(buf, N, _TRUNCATE, fmt, xs...); } +/* Copy to static narrow string buffer. */ +template <size_t N> +inline int Strcpy(char (&dst)[N], const char* const src) +{ + return strcpy_s(dst, N, src); +} + inline int Cmp(const int a, const int b) { if (a == b) return 0; |