1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00
OpenMW/components/files/conversion.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
754 B
C++
Raw Normal View History

#include "conversion.hpp"
#include <components/misc/stringops.hpp>
std::string Files::pathToUnicodeString(const std::filesystem::path& path)
{
return Misc::StringUtils::u8StringToString(path.u8string());
}
std::string Files::pathToUnicodeString(std::filesystem::path&& path)
{
return Misc::StringUtils::u8StringToString(path.u8string());
}
std::filesystem::path Files::pathFromUnicodeString(std::string_view path)
{
return Misc::StringUtils::stringToU8String(path);
}
std::filesystem::path Files::pathFromUnicodeString(std::string&& path)
{
return Misc::StringUtils::stringToU8String(std::move(path));
}
std::filesystem::path Files::pathFromUnicodeString(const char* path)
{
return Misc::StringUtils::stringToU8String(path);
}