From 4d0b49fcd3e3dc1ac871bd08bcbecbbcec3f29eb Mon Sep 17 00:00:00 2001 From: Yoshi Cheng-Hao Huang Date: Mon, 25 Oct 2021 18:24:07 +0000 Subject: [PATCH] Bug 1737107 - Add documentation for Collator::GetSortKey. r=platform-i18n-reviewers,anba,dminor Differential Revision: https://phabricator.services.mozilla.com/D129177 --- intl/components/src/Collator.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/intl/components/src/Collator.h b/intl/components/src/Collator.h index 6e76d6825258..dcb5a12a4f9f 100644 --- a/intl/components/src/Collator.h +++ b/intl/components/src/Collator.h @@ -38,6 +38,15 @@ class Collator final { ~Collator(); + /** + * Get a sort key with the provided UTF-16 string, and store the sort key into + * the provided buffer of byte array. + * Every sort key ends with 0x00, and the terminating 0x00 byte is counted + * when calculating the length of buffer. For the purpose of other byte + * values, check the "Special Byte Values" document from ICU. + * + * https://icu.unicode.org/design/collation/bytes + */ template ICUResult GetSortKey(Span aString, B& aBuffer) const { return FillBufferWithICUCall(