diff --git a/include/stdex/string.hpp b/include/stdex/string.hpp index 1b7e64e28..25ba752a2 100644 --- a/include/stdex/string.hpp +++ b/include/stdex/string.hpp @@ -1503,6 +1503,22 @@ namespace stdex } } + /// + /// Copy zero-terminated string + /// + /// \param[in] dst Destination string + /// \param[in] src Source string + /// + /// \return Number of code units excluding zero terminator in the dst string after the operation. + /// + template + inline size_t strncpy( + _Out_ _Post_maybez_ T1 (&dst)[N1], + _In_ const T2 (&src)[N2]) + { + return strncpy(dst, N1, src, N2); + } + /// /// Append zero-terminated string ///