summaryrefslogtreecommitdiffstats
path: root/src/common/string_util.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* audio: rewrite IAudioDeviceLiam2024-02-211-0/+4
|
* android: Fix resolving android URIs in native codeCharles Lombardo2023-10-301-0/+12
|
* gdbserver: use numeric character references for unicodeLiam2023-10-021-0/+5
|
* common: string_util: Use std::string_view for UTF16ToUTF8/UTF8ToUTF16W.bunnei2023-03-191-7/+7
|
* Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"ameerj2023-02-031-1/+1
| | | | | This reverts commit 25fc5c0e1158cb8e81cbc769b24ad84032a1fbfd, reversing changes made to af20e25081f97d55b451606c87922e2b49f0d363.
* Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer"liamwhite2023-02-021-1/+1
|
* fsp_srv: Use ReadBufferSpanameerj2022-12-251-1/+1
|
* string_util: Fix Mingw compile errorameerj2022-12-011-2/+2
| | | | Co-Authored-By: liamwhite <9658600+liamwhite@users.noreply.github.com>
* string_util: Add U16StringFromBufferlat9nq2022-05-161-0/+4
| | | | | | 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.
* chore: add missing SPDX tagsAndrea Pappacoda2022-04-281-3/+3
| | | | Follow-up to 99ceb03a1cfcf35968cab589ea188a8c406cda52
* common: Reduce unused includesameerj2022-03-191-2/+0
|
* string_util: Make use of std::string_view and add bounds checkingMorph2021-10-141-4/+4
| | | | Makes use of std::string_view in StringFromFixedZeroTerminatedBuffer and add bounds checking
* string_util: Prevent out of bounds access in u16string_view bufferMorph2021-10-141-2/+2
|
* common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph2021-05-261-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* string_util: Remove MSVC workaround for converting between UTF8/UTF16Morph2021-02-081-14/+0
| | | | This has been fixed as of Visual Studio 2019 Version 16.2
* common: Enable warnings as errorsLioncash2020-11-021-2/+3
| | | | Cleans up common so that we can enable warnings as errors.
* common/logging: don't use regex for path trimmingBreadFish642020-01-231-22/+0
|
* am: Deglobalize software keyboard appletZach Hilman2018-11-181-2/+2
|
* string_util: Implement buffer to UTF-16 string helper functionZach Hilman2018-11-181-0/+9
| | | Needed as most all software keyboard functions use fixed-length UTF16 string buffers.
* string_util: Remove ArrayToString()Lioncash2018-11-141-19/+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.
* string_util: Remove TryParse()Lioncash2018-11-141-37/+3
| | | | | | 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.
* string_util: unify UTF8<->UTF16 conversion to codecvtWeiyi Wang2018-10-021-109/+6
|
* string_util: remove ShiftJIS/CP1252 conversion functionWeiyi Wang2018-10-021-19/+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
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-21/+21
|
* common/string_utils: replace boost::transform with std counterpartzhupengfei2018-07-291-3/+5
| | | | Note: according to cppreference it is necessary to convert char to unsigned char when using std::tolower and std::toupper, otherwise the behaviour would be undefined.
* string_util: Get rid of separate resize() in CPToUTF16(), UTF16ToUTF8(), CodeToUTF8() and UTF8ToUTF16()Lioncash2018-07-221-20/+22
| | | | | | | | There's no need to perform the resize separately here, since the constructor allows presizing the buffer. Also move the empty string check before the construction of the string to make the early out more straightforward.
* string_util: Use emplace_back() in SplitString() instead of push_back()Lioncash2018-07-221-2/+3
| | | | | | | | | | | | | This is equivalent to doing: push_back(std::string("")); which is likely not to cause issues, assuming a decent std::string implementation with small-string optimizations implemented in its design, however it's still a little unnecessary to copy that buffer regardless. Instead, we can use emplace_back() to directly construct the empty string within the std::vector instance, eliminating any possible overhead from the copy.
* string_util: Remove unnecessary std::string instance in TabsToSpaces()Lioncash2018-07-221-7/+6
| | | | | | 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.
* string_util: Remove AsciiToHex()Lioncash2018-07-191-12/+0
| | | | Easy TODO
* More improvements to GDBStub (#653)Hedges2018-07-131-1/+1
| | | | | | | | | | | * More improvements to GDBStub - Debugging of threads should work correctly with source and assembly level stepping and modifying registers and memory, meaning threads and callstacks are fully clickable in VS. - List of modules is available to the client, with assumption that .nro and .nso are backed up by an .elf with symbols, while deconstructed ROMs keep N names. - Initial support for floating point registers. * Tidy up as requested in PR feedback * Tidy up as requested in PR feedback
* Rename logging macro back to LOG_*James Rowe2018-07-031-4/+4
|
* Common/string_util: add StringFromBuffer functionmailwl2018-06-071-0/+4
| | | | convert input buffer (std::vector<u8>) to string, stripping zero chars
* string_util: Remove StringFromFormat() and related functionsLioncash2018-04-301-70/+0
| | | | Given we utilize fmt, we don't need to provide our own functions for formatting anymore
* common: Move logging macros over to new fmt-capable macros where applicableLioncash2018-04-271-5/+5
|
* Logging: Create logging macros based on fmtlibDaniel Lim Wee Soong2018-03-221-0/+23
| | | | | | | | | 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.
* Format: Run the new clang format on everythingJames Rowe2018-01-211-2/+2
|
* Fixed type conversion ambiguityHuw Pascoe2017-09-301-1/+1
|
* Support mingw cross-compileJannik Vogel2016-12-051-1/+1
|
* Add mingw compile supportJames Rowe2016-11-141-2/+3
|
* Remove special rules for Windows.h and library includesYuri Kunde Schlesner2016-09-211-1/+1
|
* Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner2016-09-211-1/+1
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-211-3/+1
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-181-116/+75
|
* Fix encode problem On WindowsLFsWang2016-03-311-8/+8
|
* Common: Work around bug in MSVC2015 standard libraryYuri Kunde Schlesner2015-08-031-0/+14
| | | | | | The char16_t/char32_t implementations aren't present in the library and cause linker errors. This is a known issue that wasn't fixed in VS2015 RTM.
* Common : Fix Conversion Warningszawata2015-07-191-1/+1
|
* Common: Fix string_util includes.Emmanuel Gil Peyrot2015-06-281-2/+7
|
* Common: Add StringFromFixedZeroTerminatedBufferYuri Kunde Schlesner2015-05-081-0/+8
|
* string_util: Get rid of UriDecode/UriEncodeLioncash2015-05-071-125/+0
|
* Common: Remove common.hYuri Kunde Schlesner2015-05-071-1/+3
|
* Build: Fixed some warningsSubv2015-02-121-3/+3
|
* Fix MSVC-related #defines and add CMakeLists commentdarkf2014-12-301-3/+3
|
* Fix merge conflictsdarkf2014-12-301-16/+16
|\
| * License changepurpasmart962014-12-211-2/+2
| |
| * Convert old logging calls to new logging macrosYuri Kunde Schlesner2014-12-131-5/+5
| |
| * Merge pull request #261 from neobrain/boostTony Wasserka2014-12-121-3/+3
| |\ | | | | | | Add Boost as a submodule and add some minor cleanups using Boost.Range
| | * StringUtil: Perform some minimal cleanup.Tony Wasserka2014-12-071-3/+3
| | |
| * | Explicitly specify LE strings to iconv, fixes paths in Steel Diverarchshift2014-12-101-2/+2
| |/
| * Change NULLs to nullptrs.Rohit Nirmal2014-12-031-4/+4
| |
* | Fix MinGW builddarkf2014-11-291-3/+3
|/
* Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot2014-11-191-9/+9
|
* Use std::u16string for conversion between UTF-8 and UTF-16, FS:USER functionsarchshift2014-11-131-48/+110
|
* Removed uses of raw c-string manipulation functions.archshift2014-10-241-9/+2
|
* Merge pull request #99 from archshift/ext-checkbunnei2014-09-111-10/+10
|\ | | | | loader.cpp: improved file extension checking, made Upper/LowerStr useful, moved string_util into Common namespace
| * Added string_util to common, small changes in loader.cpparchshift2014-09-091-2/+6
| |
| * loader.cpp: improved file extension checking, made Upper/LowerStr usefularchshift2014-09-091-10/+6
| | | | | | | | Instead of forcibly taking the last 4 characters, it now finds the last extension separator (the period) and takes a substr of its location.
* | Merge pull request #103 from archshift/prunebunnei2014-09-111-4/+0
|\ \ | | | | | | Prune redundant includes
| * | common: Prune all redundant includesarchshift2014-09-091-4/+0
| |/
* / Common: Fix a potential infinite loop in StringUtil's ReplaceAllLioncash2014-09-081-3/+8
|/
* Common: Move remaining C header includes over to their C++ equivalentLioncash2014-08-171-3/+3
|
* added helper functions for upper/lowercase stringsbunnei2014-04-151-0/+16
|
* fixed project includes to use new directory structurebunnei2014-04-091-3/+3
|
* got rid of 'src' folders in each sub-projectbunnei2014-04-091-0/+531