diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-05-26 01:32:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 01:32:56 +0200 |
commit | 065867e2c24e9856c360fc2d6b9a86c92aedc43e (patch) | |
tree | 7964e85ef4f01a3c2b8f44e850f37b384405b930 /src/common/fs/fs_util.h | |
parent | Merge pull request #6349 from german77/suppress_config_warning (diff) | |
download | yuzu-065867e2c24e9856c360fc2d6b9a86c92aedc43e.tar yuzu-065867e2c24e9856c360fc2d6b9a86c92aedc43e.tar.gz yuzu-065867e2c24e9856c360fc2d6b9a86c92aedc43e.tar.bz2 yuzu-065867e2c24e9856c360fc2d6b9a86c92aedc43e.tar.lz yuzu-065867e2c24e9856c360fc2d6b9a86c92aedc43e.tar.xz yuzu-065867e2c24e9856c360fc2d6b9a86c92aedc43e.tar.zst yuzu-065867e2c24e9856c360fc2d6b9a86c92aedc43e.zip |
Diffstat (limited to 'src/common/fs/fs_util.h')
-rw-r--r-- | src/common/fs/fs_util.h | 25 |
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 @@ +// Copyright 2021 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <concepts> +#include <string> +#include <string_view> + +namespace Common::FS { + +template <typename T> +concept IsChar = std::same_as<T, char>; + +/** + * Converts a UTF-8 encoded std::string or std::string_view to a std::u8string. + * + * @param utf8_string UTF-8 encoded string + * + * @returns UTF-8 encoded std::u8string. + */ +[[nodiscard]] std::u8string ToU8String(std::string_view utf8_string); + +} // namespace Common::FS |