omw  0.2.1-beta
windows/string.h
1 /*
2 author Oliver Blaser
3 date 15.12.2021
4 copyright MIT - Copyright (c) 2021 Oliver Blaser
5 */
6 
7 #ifndef IG_OMW_WINDOWS_STRING_H
8 #define IG_OMW_WINDOWS_STRING_H
9 
10 #include "../../omw/defs.h"
11 #ifdef OMW_PLAT_WIN
12 
13 #include <cstddef>
14 #include <string>
15 
16 #include "../../omw/windows/error.h"
17 
18 namespace omw
19 {
20  namespace windows
21  {
24  size_t utf8_to_wstr(const std::string& src, void* LPWSTR_dest, size_t destSize);
25  size_t utf8_to_wstr(const std::string& src, void* LPWSTR_dest, size_t destSize, omw::windows::ErrorCode& ec);
26  size_t wstr_to_utf8(const void* LPCWCH_src, char* dest, size_t destSize);
27  size_t wstr_to_utf8(const void* LPCWCH_src, char* dest, size_t destSize, omw::windows::ErrorCode& ec);
28  void wstr_to_utf8(const void* LPCWCH_src, std::string& dest);
29  void wstr_to_utf8(const void* LPCWCH_src, std::string& dest, omw::windows::ErrorCode& ec);
31  }
32 }
33 
34 #endif // OMW_PLAT_WIN
35 #endif // IG_OMW_WINDOWS_STRING_H
std::string
C++ standard string. See std::basic_string.
Definition: linkToStd.dox:19
omw::windows::wstr_to_utf8
size_t wstr_to_utf8(const void *LPCWCH_src, char *dest, size_t destSize)
Converts a Windows API compatible wide string to an UTF-8 string.
Definition: windows/string.cpp:117
omw::windows::utf8_to_wstr
size_t utf8_to_wstr(const std::string &src, void *LPWSTR_dest, size_t destSize)
Converts an UTF-8 string to a Windows API compatible wide string.
Definition: windows/string.cpp:34
omw
Main namespace.
omw::windows::ErrorCode
Definition: error.h:38