Lines Matching full:destination
73 // not fail if source is longer than destination_size. The destination
75 static void safe_wcscpy(wchar_t *destination, size_t destination_size,
80 // are longer than destination_size. The destination buffer is always
82 static void safe_wcsncpy(wchar_t *destination, size_t destination_size,
105 inline void WindowsStringUtils::safe_wcscpy(wchar_t *destination,
109 wcscpy_s(destination, destination_size, source);
112 // wcsncpy doesn't 0-terminate the destination buffer if the source string
113 // is longer than size. Ensure that the destination is 0-terminated.
114 wcsncpy(destination, source, destination_size);
115 if (destination && destination_size)
116 destination[destination_size - 1] = 0;
121 inline void WindowsStringUtils::safe_wcsncpy(wchar_t *destination,
126 wcsncpy_s(destination, destination_size, source, count);
129 // wcsncpy doesn't 0-terminate the destination buffer if the source string
130 // is longer than size. Ensure that the destination is 0-terminated.
134 wcsncpy(destination, source, count);
135 if (destination && count)
136 destination[count - 1] = 0;