2023-02-28 01:15:26 +00:00
|
|
|
// AUTOGENERATED COPYRIGHT HEADER START
|
|
|
|
// Copyright (C) 2021-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
|
|
|
// AUTOGENERATED COPYRIGHT HEADER END
|
2021-05-01 16:31:13 +00:00
|
|
|
|
|
|
|
#pragma once
|
2022-08-29 10:29:44 +00:00
|
|
|
#include "warning-disable.hpp"
|
2021-05-01 16:31:13 +00:00
|
|
|
#include <filesystem>
|
|
|
|
#include <string>
|
2022-08-29 10:29:44 +00:00
|
|
|
#include "warning-enable.hpp"
|
2021-05-01 16:31:13 +00:00
|
|
|
|
|
|
|
namespace streamfx::util::platform {
|
|
|
|
#ifdef WIN32
|
|
|
|
std::string native_to_utf8(std::wstring const& v);
|
|
|
|
std::filesystem::path native_to_utf8(std::filesystem::path const& v);
|
|
|
|
|
|
|
|
std::wstring utf8_to_native(std::string const& v);
|
|
|
|
std::filesystem::path utf8_to_native(std::filesystem::path const& v);
|
|
|
|
#else
|
|
|
|
inline std::string native_to_utf8(std::string const& v)
|
|
|
|
{
|
|
|
|
return std::string(v);
|
|
|
|
};
|
|
|
|
inline std::filesystem::path native_to_utf8(std::filesystem::path const& v)
|
|
|
|
{
|
|
|
|
return std::filesystem::path(v);
|
|
|
|
};
|
|
|
|
|
|
|
|
inline std::string utf8_to_native(std::string const& v)
|
|
|
|
{
|
|
|
|
return std::string(v);
|
|
|
|
};
|
|
|
|
inline std::filesystem::path utf8_to_native(std::filesystem::path const& v)
|
|
|
|
{
|
|
|
|
return std::filesystem::path(v);
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
} // namespace streamfx::util::platform
|