MCPcopy Create free account
hub / github.com/AgoraIO/API-Examples / utf82cs

Function utf82cs

windows/APIExample/APIExample/stdafx.cpp:357–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355 return szBuf;
356}
357CString utf82cs(std::string utf8)
358{
359 /* TCHAR szBuf[2048] = { 0 };
360 MultiByteToWideChar(CP_UTF8, 0, utf8.c_str(), 2048, szBuf, 2048);
361 return szBuf;*/
362 int len = MultiByteToWideChar(CP_UTF8, 0, utf8.c_str(), -1, NULL, 0);
363 if (len == 0)
364 {
365 return CString();
366 }
367 std::vector<wchar_t> buffer(len);
368 MultiByteToWideChar(CP_UTF8, 0, utf8.c_str(), -1, buffer.data(), len);
369 return CString(buffer.data());
370}
371
372
373std::string UrlANSI(const char *str)

Callers 15

OnEIDErrorMethod · 0.85
onSnapshotTakenMethod · 0.85
OnEIDMetadataReceivedMethod · 0.85
UpdateViewsMethod · 0.85
InitAgoraMethod · 0.85
OnEIDExtensionEventMethod · 0.85
OnEIDonFaceInfoMethod · 0.85
OnEIDLeaveChannelMethod · 0.85

Calls 1

dataMethod · 0.80

Tested by 1

UpdateViewsMethod · 0.68