Page Menu
Home
desp's stash
Search
Configure Global Search
Log In
Files
F835518
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
Mon, Aug 17, 4:46 AM (1 d, 15 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
04/1d/a68124857b55b335872958a5b45c
Attached To
rSCY Scylla
Event Timeline
Log In to Comment