Added back wstr_to_utf8buf() and utf8_to_wstrbuf() for windows

This commit is contained in:
gabime
2024-11-29 22:48:38 +02:00
parent 693062a8bf
commit 03e20348e2
2 changed files with 69 additions and 0 deletions

View File

@@ -75,6 +75,12 @@ SPDLOG_API bool is_color_terminal() noexcept;
// Source: https://github.com/agauniyal/rang/
SPDLOG_API bool in_terminal(FILE *file) noexcept;
#if (defined _WIN32)
SPDLOG_API void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target);
SPDLOG_API void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target);
#endif
// Return directory name from given path or empty string
// "abc/file" => "abc"
// "abc/" => "abc"