0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

libobs/util/dstr.c: Add missing dstr_from_wcs

This commit is contained in:
jp9000 2014-05-30 02:40:23 -07:00
parent 38b610efca
commit e18795a164

View File

@ -647,6 +647,13 @@ char *dstr_to_mbs(const struct dstr *str)
return dst;
}
wchar_t *dstr_to_wcs(const struct dstr *str)
{
wchar_t *dst;
os_utf8_to_wcs_ptr(str->array, str->len, &dst);
return dst;
}
void dstr_from_wcs(struct dstr *dst, const wchar_t *wstr)
{
size_t len = wchar_to_utf8(wstr, 0, NULL, 0, 0);