summaryrefslogtreecommitdiffstats
path: root/src/common/string_util.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-02-23 17:34:21 +0100
committerGitHub <noreply@github.com>2024-02-23 17:34:21 +0100
commit215e887be088ed572da999e9ec7fd8559198524b (patch)
tree793415b72d36bb07d0174dfcf731f81235008936 /src/common/string_util.cpp
parentMerge pull request #13073 from FearlessTobi/fsp-srv-ipc (diff)
parentoboe_sink: handle temporary stream creation failure (diff)
downloadyuzu-215e887be088ed572da999e9ec7fd8559198524b.tar
yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.gz
yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.bz2
yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.lz
yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.xz
yuzu-215e887be088ed572da999e9ec7fd8559198524b.tar.zst
yuzu-215e887be088ed572da999e9ec7fd8559198524b.zip
Diffstat (limited to 'src/common/string_util.cpp')
-rw-r--r--src/common/string_util.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp
index 72c481798..1909aced5 100644
--- a/src/common/string_util.cpp
+++ b/src/common/string_util.cpp
@@ -38,6 +38,10 @@ std::string StringFromBuffer(std::span<const u8> data) {
return std::string(data.begin(), std::find(data.begin(), data.end(), '\0'));
}
+std::string StringFromBuffer(std::span<const char> data) {
+ return std::string(data.begin(), std::find(data.begin(), data.end(), '\0'));
+}
+
// Turns " hej " into "hej". Also handles tabs.
std::string StripSpaces(const std::string& str) {
const std::size_t s = str.find_first_not_of(" \t\r\n");