2012-04-24 21:53:39 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2013-07-30 18:25:31 +04:00
|
|
|
#include <stdint.h>
|
2012-04-24 21:53:39 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace unicode {
|
|
|
|
|
|
|
|
// Multi-character mappings (from SpecialCasing.txt) map a single Unicode
|
|
|
|
// value to a sequence of 2 or 3 Unicode characters. There are currently none
|
2014-01-04 19:02:17 +04:00
|
|
|
// defined outside the BMP, so we can use char16_t here. Unused trailing
|
2012-04-24 21:53:39 +04:00
|
|
|
// positions in mMappedChars are set to 0.
|
|
|
|
struct MultiCharMapping {
|
2014-01-04 19:02:17 +04:00
|
|
|
char16_t mOriginalChar;
|
|
|
|
char16_t mMappedChars[3];
|
2012-04-24 21:53:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
// Return a pointer to the special case mapping for the given character;
|
2012-08-24 11:49:00 +04:00
|
|
|
// returns nullptr if no such mapping is defined.
|
2012-08-22 19:56:38 +04:00
|
|
|
const MultiCharMapping* SpecialUpper(uint32_t aCh);
|
|
|
|
const MultiCharMapping* SpecialLower(uint32_t aCh);
|
|
|
|
const MultiCharMapping* SpecialTitle(uint32_t aCh);
|
2012-04-24 21:53:39 +04:00
|
|
|
|
|
|
|
} // namespace unicode
|
|
|
|
} // namespace mozilla
|