You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw/components/files/conversion.cpp

30 lines
763 B
C++

#include "conversion.hpp"
#include <components/misc/strings/conversion.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);
}