diff options
Diffstat (limited to 'Src/string.c')
-rw-r--r-- | Src/string.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Src/string.c b/Src/string.c index 397c868ce..0a7f200ab 100644 --- a/Src/string.c +++ b/Src/string.c @@ -54,6 +54,22 @@ ztrdup(const char *s) return t; } +#ifdef ZLE_UNICODE_SUPPORT +/**/ +mod_export wchar_t * +wcs_ztrdup(const wchar_t *s) +{ + wchar_t *t; + + if (!s) + return NULL; + t = (wchar_t *)zalloc(wcslen((wchar_t *)s) + 1); + wcscpy(t, s); + return t; +} +#endif /* ZLE_UNICODE_SUPPORT */ + + /* concatenate s1, s2, and s3 in dynamically allocated buffer */ /**/ |