Page Menu
Home
desp's stash
Search
Configure Global Search
Log In
Files
F527325
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 7, 1:53 PM (8 h, 6 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4a/cf/977aa8995b5232d25b02d476349e
Attached To
rSCY Scylla
Event Timeline
Log In to Comment