summaryrefslogtreecommitdiffstats
path: root/include/utils/Unicode.h
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-10-07 15:08:24 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-07 15:08:24 -0700
commit270928bd4a1db1dc0d989f4e9897a81ab865e30e (patch)
treef9188005feb5a9756922f584d40cdc38bf9103ce /include/utils/Unicode.h
parent4cc8bafb4b10614dc881ed8121ce4754811e161d (diff)
parent715311fa5aeb39fd0904209e1428a3656c721c3d (diff)
downloadframeworks_base-270928bd4a1db1dc0d989f4e9897a81ab865e30e.zip
frameworks_base-270928bd4a1db1dc0d989f4e9897a81ab865e30e.tar.gz
frameworks_base-270928bd4a1db1dc0d989f4e9897a81ab865e30e.tar.bz2
Merge changes Idbfeb3cc,I03e8e2e7,Iff9eed78
* changes: Fix regression in CursorWindow.getString() Bug: 5332296 Clean up CursorWindow lifetime. Bug: 5332296 Fix regression in CursorWindow.copyStingToBuffer. Bug: 5332296
Diffstat (limited to 'include/utils/Unicode.h')
-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.