summaryrefslogtreecommitdiff
path: root/src/common/string_util.h
diff options
context:
space:
mode:
authorGravatar bunnei2018-11-20 08:24:11 -0800
committerGravatar GitHub2018-11-20 08:24:11 -0800
commitb6d2c64f4dcb01f1ffc99f9a057910ec65c6a401 (patch)
treeb75fde22327ac851821d58078614e62cc1c29916 /src/common/string_util.h
parentMerge pull request #1739 from lioncash/lm (diff)
parentsoftware_keyboard: Fix erroneous extra PushNormalData (diff)
downloadyuzu-b6d2c64f4dcb01f1ffc99f9a057910ec65c6a401.tar.gz
yuzu-b6d2c64f4dcb01f1ffc99f9a057910ec65c6a401.tar.xz
yuzu-b6d2c64f4dcb01f1ffc99f9a057910ec65c6a401.zip
Merge pull request #1667 from DarkLordZach/swkbd
am: Implement HLE software keyboard applet
Diffstat (limited to 'src/common/string_util.h')
-rw-r--r--src/common/string_util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/string_util.h b/src/common/string_util.h
index 08f96533b..583fd05e6 100644
--- a/src/common/string_util.h
+++ b/src/common/string_util.h
@@ -67,6 +67,14 @@ bool ComparePartialString(InIt begin, InIt end, const char* other) {
67std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, std::size_t max_len); 67std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, std::size_t max_len);
68 68
69/** 69/**
70 * Creates a UTF-16 std::u16string from a fixed-size NUL-terminated char buffer. If the buffer isn't
71 * null-terminated, then the string ends at the greatest multiple of two less then or equal to
72 * max_len_bytes.
73 */
74std::u16string UTF16StringFromFixedZeroTerminatedBuffer(std::u16string_view buffer,
75 std::size_t max_len);
76
77/**
70 * Attempts to trim an arbitrary prefix from `path`, leaving only the part starting at `root`. It's 78 * Attempts to trim an arbitrary prefix from `path`, leaving only the part starting at `root`. It's
71 * intended to be used to strip a system-specific build directory from the `__FILE__` macro, 79 * intended to be used to strip a system-specific build directory from the `__FILE__` macro,
72 * leaving only the path relative to the sources root. 80 * leaving only the path relative to the sources root.