This commit is contained in:
2022-02-01 20:29:15 +08:00
parent cfa10b4e37
commit 0c8dba0a0a
2 changed files with 21 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
#define _UTILS_CPP2C_H
#include <string>
#include <wchar.h>
namespace cpp2c {
/**
@@ -11,6 +12,13 @@ namespace cpp2c {
* @return true if succeeded.
*/
bool string2char(std::string inp, char*& out);
/**
* @brief Convert wstring to wchar_t*
* @param inp Input string
* @param out The pointer to output buffer. Need free memory by using free.
* @return true if succeeded.
*/
bool string2char(std::wstring inp, wchar_t*& out);
}
#endif