Page Menu
Home
desp's stash
Search
Configure Global Search
Log In
Files
F547841
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
Wed, Jan 28, 11:28 PM (1 d, 9 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8b/e7/657f9cad80c69ecda5ba5c99cead
Attached To
rSCY Scylla
Event Timeline
Log In to Comment