summaryrefslogtreecommitdiff
path: root/src/common/string_util.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-02-20audio: rewrite IAudioDeviceGravatar Liam1-0/+1
2023-10-01gdbserver: use numeric character references for unicodeGravatar Liam1-0/+1
2023-03-18common: string_util: Use std::string_view for UTF16ToUTF8/UTF8ToUTF16W.Gravatar bunnei1-4/+4
2023-02-03Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"Gravatar ameerj1-1/+2
This reverts commit 25fc5c0e1158cb8e81cbc769b24ad84032a1fbfd, reversing changes made to af20e25081f97d55b451606c87922e2b49f0d363.
2023-02-02Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ↵Gravatar liamwhite1-2/+1
ReadBuffer"
2022-12-25fsp_srv: Use ReadBufferSpanGravatar ameerj1-1/+2
2022-05-15string_util: Add U16StringFromBufferGravatar lat9nq1-0/+2
Qt's QString::toStdU16String doesn't work when compiling against the latest libstdc++, at least when using Clang. This function effectively does the same thing as the aforementioned one.
2022-04-28chore: add missing SPDX tagsGravatar Andrea Pappacoda1-3/+3
Follow-up to 99ceb03a1cfcf35968cab589ea188a8c406cda52
2021-10-14string_util: Make use of std::string_view and add bounds checkingGravatar Morph1-1/+1
Makes use of std::string_view in StringFromFixedZeroTerminatedBuffer and add bounds checking
2021-05-25common: fs: Rework the Common Filesystem interface to make use of ↵Gravatar Morph1-2/+0
std::filesystem (#6270) * common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
2020-08-15common: Make use of [[nodiscard]] where applicableGravatar Lioncash1-16/+18
Now that clang-format makes [[nodiscard]] attributes format sensibly, we can apply them to several functions within the common library to allow the compiler to complain about any misuses of the functions.
2020-07-25common/string_util: Remove unimplemented function prototype (#4414)Gravatar LC1-12/+0
This function was relocated to log.h as a constexpr function, so this can be removed.
2018-11-18am: Deglobalize software keyboard appletGravatar Zach Hilman1-2/+2
2018-11-18string_util: Implement buffer to UTF-16 string helper functionGravatar Zach Hilman1-0/+8
Needed as most all software keyboard functions use fixed-length UTF16 string buffers.
2018-11-13string_util: Remove ArrayToString()Gravatar Lioncash1-2/+0
An old function from Dolphin. This is also unused, and pretty inflexible when it comes to printing out different data types (for example, one might not want to print out an array of u8s but a different type instead. Given we use fmt, there's no need to keep this implementation of the function around.
2018-11-13string_util: Remove TryParse()Gravatar Lioncash1-17/+0
This is an unused hold-over from Dolphin that was primarily used to parse values out of the .ini files. Given we already have libraries that do this for us, we don't need to keep this around.
2018-11-13string_util: Remove ThousandSeparate()Gravatar Lioncash1-14/+0
This is currently unused and doesn't really provide much value to keep around either.
2018-10-02string_util: remove TString conversion for windowsGravatar Weiyi Wang1-18/+0
First of all they are foundamentally broken. As our convention is that std::string is always UTF-8, these functions assume that the multi-byte character version of TString (std::string) from windows is also in UTF-8, which is almost always wrong. We are not going to build multi-byte character build, and even if we do, this dirty work should be handled by frontend framework early.
2018-10-02string_util: remove ShiftJIS/CP1252 conversion functionGravatar Weiyi Wang1-3/+0
We always use unicode internally. Any dirty work of conversion with other codec should be handled by frontend framework (Qt). Further more, ShiftJIS/CP1252 are not special (they are not code set used by 3ds, or any guest/host dependencies we have), so there is no reason to specifically include them
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"Gravatar fearlessTobi1-2/+2
2018-07-22string_util: Remove unnecessary std::string instance in TabsToSpaces()Gravatar Lioncash1-1/+1
We can just use the variant of std::string's replace() function that can replace an occurrence with N copies of the same character, eliminating the need to allocate a std::string containing a buffer of spaces.
2018-07-18string_util: Remove AsciiToHex()Gravatar Lioncash1-3/+0
Easy TODO
2018-06-07Common/string_util: add StringFromBuffer functionGravatar mailwl1-0/+2
convert input buffer (std::vector<u8>) to string, stripping zero chars
2018-04-29string_util: Remove StringFromFormat() and related functionsGravatar Lioncash1-14/+0
Given we utilize fmt, we don't need to provide our own functions for formatting anymore
2018-03-22Logging: Create logging macros based on fmtlibGravatar Daniel Lim Wee Soong1-0/+13
Add a new set of logging macros based on fmtlib Similar but not exactly the same as https://github.com/citra-emu/citra/pull/3533 Citra currently uses a different version of fmt, which does not support FMT_VARIADIC so make_args is used instead. On the other hand, yuzu uses fmt 4.1.0 which doesn't have make_args yet so FMT_VARIADIC is used.
2018-01-20Format: Run the new clang format on everythingGravatar James Rowe1-1/+1
2017-09-30Fixed type conversion ambiguityGravatar Huw Pascoe1-1/+1
2016-09-21Remove empty newlines in #include blocks.Gravatar Emmanuel Gil Peyrot1-1/+0
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-18Sources: Run clang-format on everything.Gravatar Emmanuel Gil Peyrot1-28/+28
2016-03-31Fix encode problem On WindowsGravatar LFsWang1-1/+1
2015-06-28Common: Fix string_util includes.Gravatar Emmanuel Gil Peyrot1-1/+2
2015-05-08Common: Add StringFromFixedZeroTerminatedBufferGravatar Yuri Kunde Schlesner1-0/+6
2015-05-07string_util: Get rid of UriDecode/UriEncodeGravatar Lioncash1-2/+0
2015-05-07Common: Remove common.hGravatar Yuri Kunde Schlesner1-1/+1
2014-12-20License changeGravatar purpasmart961-2/+2
2014-12-13Implement text path trimming for shorter paths.Gravatar Yuri Kunde Schlesner1-0/+15
2014-11-19Remove trailing spaces in every file but the ones imported from SkyEye, AOSP ↵Gravatar Emmanuel Gil Peyrot1-1/+1
or generated
2014-11-12Use std::u16string for conversion between UTF-8 and UTF-16, FS:USER functionsGravatar archshift1-3/+5
2014-10-23Removed uses of raw c-string manipulation functions.Gravatar archshift1-1/+0
2014-09-08Added string_util to common, small changes in loader.cppGravatar archshift1-3/+6
2014-09-08loader.cpp: improved file extension checking, made Upper/LowerStr usefulGravatar archshift1-2/+3
Instead of forcibly taking the last 4 characters, it now finds the last extension separator (the period) and takes a substr of its location.
2014-08-17Common: Move header guards over to pragma onceGravatar Lioncash1-8/+4
Also replaced C headers with the C++ equivalent ones
2014-04-14added helper functions for upper/lowercase stringsGravatar bunnei1-0/+6
2014-04-08fixed project includes to use new directory structureGravatar bunnei1-1/+1
2014-04-08got rid of 'src' folders in each sub-projectGravatar bunnei1-0/+0
2014-04-01convert tabs to spacesGravatar bunnei1-18/+18
2013-09-04replaced common code with dolphin commonGravatar ShizZy1-0/+111