Page Menu
Home
desp's stash
Search
Configure Global Search
Log In
Files
F554210
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
Tue, Feb 10, 4:56 AM (1 d, 1 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2f/b8/0ba03134b2bfa9e269f02cde9009
Attached To
rSCY Scylla
Event Timeline
Log In to Comment