Page Menu
Home
desp's stash
Search
Configure Global Search
Log In
Files
F607854
StringConversion.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
554 B
Subscribers
None
StringConversion.cpp
View Options
#include
"StringConversion.h"
//#include <cstdlib>
#include
<atlbase.h>
#include
<atlconv.h>
const
char
*
StringConversion
::
ToASCII
(
const
wchar_t
*
str
,
char
*
buf
,
size_t
bufsize
)
{
//wcstombs(buf, str, bufsize);
ATL
::
CW2A
str_a
=
str
;
strncpy_s
(
buf
,
bufsize
,
str_a
,
bufsize
);
buf
[
bufsize
-
1
]
=
'\0'
;
return
buf
;
}
const
wchar_t
*
StringConversion
::
ToUTF16
(
const
char
*
str
,
wchar_t
*
buf
,
size_t
bufsize
)
{
//mbstowcs_s(buf, str, bufsize);
ATL
::
CA2W
str_w
=
str
;
wcsncpy_s
(
buf
,
bufsize
,
str_w
,
bufsize
);
buf
[
bufsize
-
1
]
=
L
'\0'
;
return
buf
;
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Thu, Apr 2, 10:40 PM (1 d, 16 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
51/a6/2b2aa7dfcbcb0f852a8c5b8877d4
Attached To
rSCY Scylla
Event Timeline
Log In to Comment