summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-10-07 13:28:18 -0700
committerJeff Brown <jeffbrown@google.com>2011-10-07 13:28:18 -0700
commitde27227026e01c26a9debef77e4e268f242e713e (patch)
tree267a1bbe60b4a1a5f5955e55517dce699c8c9e0f /include
parentcc0bf53f214d8c9029ce27ac3985dc5c18d5130a (diff)
downloadframeworks_native-de27227026e01c26a9debef77e4e268f242e713e.zip
frameworks_native-de27227026e01c26a9debef77e4e268f242e713e.tar.gz
frameworks_native-de27227026e01c26a9debef77e4e268f242e713e.tar.bz2
Fix regression in CursorWindow.copyStingToBuffer.
Bug: 5332296 Change-Id: Iff9eed786f0a8293b6156f883a66a322ddad5e99
Diffstat (limited to 'include')
-rw-r--r--include/utils/Unicode.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/utils/Unicode.h b/include/utils/Unicode.h
index 6afb291..9273533 100644
--- a/include/utils/Unicode.h
+++ b/include/utils/Unicode.h
@@ -150,6 +150,13 @@ void utf8_to_utf32(const char* src, size_t src_len, char32_t* dst);
ssize_t utf8_to_utf16_length(const uint8_t* src, size_t srcLen);
/**
+ * Convert UTF-8 to UTF-16 including surrogate pairs.
+ * Returns a pointer to the end of the string (where a null terminator might go
+ * if you wanted to add one).
+ */
+char16_t* utf8_to_utf16_no_null_terminator(const uint8_t* src, size_t srcLen, char16_t* dst);
+
+/**
* Convert UTF-8 to UTF-16 including surrogate pairs. The destination buffer
* must be large enough to hold the result as measured by utf8_to_utf16_length
* plus an added NULL terminator.