MCPcopy Create free account
hub / github.com/SFML/SFML / pathToUtf8

Function pathToUtf8

src/SFML/Network/Sftp.cpp:86–90  ·  view source on GitHub ↗

Portable UTF-8 string conversions for C++17/C++20 compatibility See: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html

Source from the content-addressed store, hash-verified

84// Portable UTF-8 string conversions for C++17/C++20 compatibility
85// See: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html
86std::string pathToUtf8(const std::filesystem::path& path)
87{
88 const auto s = path.generic_u8string();
89 return {s.begin(), s.end()};
90}
91
92std::filesystem::path pathFromUtf8(std::string_view utf8Str)
93{

Callers 9

resolvePathMethod · 0.85
getAttributesMethod · 0.85
getDirectoryListingMethod · 0.85
createDirectoryMethod · 0.85
deleteDirectoryMethod · 0.85
renameMethod · 0.85
deleteFileMethod · 0.85
downloadMethod · 0.85
uploadMethod · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected