diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-07 00:40:48 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-07 00:40:48 +0200 |
commit | e2d0b92ffc536c3d34ee751ba688946613bc5693 (patch) | |
tree | c944a70b4db4ed5b8ec9a440335a42fb86602972 /c/util.h | |
parent | bea4e9f8740c1bf3ebe80d95ab6e749cfb5de605 (diff) | |
download | EpisodeBrowser-e2d0b92ffc536c3d34ee751ba688946613bc5693.tar.gz |
Add Strcpy.
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; |