diff options
| author | boludoz <francomaro@gmail.com> | 2023-10-15 02:02:22 -0300 |
|---|---|---|
| committer | boludoz <francomaro@gmail.com> | 2023-10-15 02:02:22 -0300 |
| commit | 3062a35eb1297067446156c43e9d0df2f684edff (patch) | |
| tree | f2ca58e0b8a6c413f3c6783a1501204729e0394c /src/common/fs/fs_util.h | |
| parent | 1a4abd184f8085f29a18453bdc4aabb3c038907a (diff) | |
Improved shortcut: add games in applist for Windows, question for start game at fullscreen & better unicode support for some Windows path funcs.
Diffstat (limited to 'src/common/fs/fs_util.h')
| -rw-r--r-- | src/common/fs/fs_util.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/common/fs/fs_util.h b/src/common/fs/fs_util.h index 2492a9f94..dbb4f5a9a 100644 --- a/src/common/fs/fs_util.h +++ b/src/common/fs/fs_util.h @@ -82,4 +82,24 @@ concept IsChar = std::same_as<T, char>; */ [[nodiscard]] std::string PathToUTF8String(const std::filesystem::path& path); -} // namespace Common::FS +/** + * Fix filename (remove invalid characters) + * + * @param u8_string dirty encoded filename string + * + * @returns utf8_string santized filename string + * + */ +[[nodiscard]] std::u8string U8FilenameSantizer(const std::u8string_view u8filename); + +/** + * Fix filename (remove invalid characters) + * + * @param utf8_string dirty encoded filename string + * + * @returns utf8_string santized filename string + * + */ +[[nodiscard]] std::string UTF8FilenameSantizer(const std::string_view filename); + +} // namespace Common::FS
\ No newline at end of file |
