summaryrefslogtreecommitdiff
path: root/src/common/fs/fs_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/fs/fs_util.h')
-rw-r--r--src/common/fs/fs_util.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/common/fs/fs_util.h b/src/common/fs/fs_util.h
new file mode 100644
index 000000000..951df53b6
--- /dev/null
+++ b/src/common/fs/fs_util.h
@@ -0,0 +1,25 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <concepts>
8#include <string>
9#include <string_view>
10
11namespace Common::FS {
12
13template <typename T>
14concept IsChar = std::same_as<T, char>;
15
16/**
17 * Converts a UTF-8 encoded std::string or std::string_view to a std::u8string.
18 *
19 * @param utf8_string UTF-8 encoded string
20 *
21 * @returns UTF-8 encoded std::u8string.
22 */
23[[nodiscard]] std::u8string ToU8String(std::string_view utf8_string);
24
25} // namespace Common::FS