Audacity  3.0.3
CodeConversions.h
Go to the documentation of this file.
1 /*!********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  @file CodeConversions.h
6  @brief Declare functions to preform UTF-8 to std::wstring conversions.
7 
8  Dmitry Vedenko
9  **********************************************************************/
10 
11 #pragma once
12 
13 #include <string>
14 #include <wx/string.h>
15 
16 namespace audacity
17 {
18 
19 STRING_UTILS_API std::string ToUTF8 (const std::wstring& wstr);
20 STRING_UTILS_API std::string ToUTF8 (const wchar_t* wstr);
21 STRING_UTILS_API std::string ToUTF8 (const wxString& wstr);
22 
23 // std::wstring is UTF16 on windows and UTF32 elsewhere.
24 STRING_UTILS_API std::wstring ToWString (const std::string& str);
25 STRING_UTILS_API std::wstring ToWString (const char* str);
26 STRING_UTILS_API std::wstring ToWString (const wxString& str);
27 
28 STRING_UTILS_API wxString ToWXString (const std::string& str);
29 STRING_UTILS_API wxString ToWXString (const std::wstring& str);
30 
31 }
str
#define str(a)
Definition: DBConnection.cpp:30
audacity::ToWXString
wxString ToWXString(const std::string &str)
Definition: CodeConversions.cpp:49
audacity
Definition: ErrorReportDialog.h:22
audacity::ToWString
std::wstring ToWString(const std::string &str)
Definition: CodeConversions.cpp:34
audacity::ToUTF8
std::string ToUTF8(const std::wstring &wstr)
Definition: CodeConversions.cpp:19