1 #ifndef LIBFILEZILLA_GLUE_WX_HEADER
2 #define LIBFILEZILLA_GLUE_WX_HEADER
9 #include "../private/defs.hpp"
11 #include "windows.hpp"
14 #include <wx/string.h>
16 #include "../format.hpp"
17 #include "../string.hpp"
20 template<
typename T,
typename std::enable_if_t<std::is_same_v<wxString,
typename std::decay_t<T>>,
int> = 0>
22 return s.ToStdWstring();
25 template<
typename T,
typename std::enable_if_t<std::is_same_v<wxString,
typename std::decay_t<T>>,
int> = 0>
31 template<
typename T,
typename std::enable_if_t<std::is_same_v<wxString,
typename std::decay_t<T>>,
int> = 0>
32 inline std::string
to_utf8(T
const& s)
34 return to_utf8(s.ToStdWstring());
37 template<
typename T,
typename std::enable_if_t<std::is_same_v<wxString,
typename std::decay_t<T>>,
int> = 0,
typename... Args>
38 std::wstring
sprintf(T
const& fmt, Args&&... args)
40 return sprintf(fmt.ToStdWstring(), std::forward<Args>(args)...);
The namespace used by libfilezilla.
Definition: apply.hpp:17
std::wstring to_wstring(std::string_view const &in)
Converts from std::string in system encoding into std::wstring.
std::wstring native_string
A string in the system's native character type and encoding. Note: This typedef changes depending on...
Definition: string.hpp:34
std::string sprintf(std::string_view const &fmt, Args &&... args)
A simple type-safe sprintf replacement.
Definition: format.hpp:456
std::string to_utf8(std::string_view const &in)
Converts from std::string in native encoding into std::string in UTF-8.
native_string to_native(std::string_view const &in)
Converts std::string to native_string.