aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common
diff options
context:
space:
mode:
authorliamwhite <[email protected]>2024-02-23 11:34:21 -0500
committerGitHub <[email protected]>2024-02-23 11:34:21 -0500
commit215e887be088ed572da999e9ec7fd8559198524b (patch)
tree793415b72d36bb07d0174dfcf731f81235008936 /src/common
parent0da6704fc2e45958ee2bf884128ce0ff5897ac1a (diff)
parent964e19ab56385117ee77b12311eb4a959e3abf4a (diff)
downloadyuzu-mainline-215e887be088ed572da999e9ec7fd8559198524b.tar.gz
yuzu-mainline-215e887be088ed572da999e9ec7fd8559198524b.zip
Merge pull request #13100 from liamwhite/audio-ipc
audio: move to new ipc
Diffstat (limited to 'src/common')
-rw-r--r--src/common/string_util.cpp4
-rw-r--r--src/common/string_util.h1
2 files changed, 5 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");
diff --git a/src/common/string_util.h b/src/common/string_util.h
index 9da1ca4e9..53d0549ca 100644
--- a/src/common/string_util.h
+++ b/src/common/string_util.h
@@ -19,6 +19,7 @@ namespace Common {
[[nodiscard]] std::string ToUpper(std::string str);
[[nodiscard]] std::string StringFromBuffer(std::span<const u8> data);
+[[nodiscard]] std::string StringFromBuffer(std::span<const char> data);
[[nodiscard]] std::string StripSpaces(const std::string& s);
[[nodiscard]] std::string StripQuotes(const std::string& s);