nsSpecialCasingData.h 946 B

123456789101112131415161718192021222324252627
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. #include <stdint.h>
  5. namespace mozilla {
  6. namespace unicode {
  7. // Multi-character mappings (from SpecialCasing.txt) map a single Unicode
  8. // value to a sequence of 2 or 3 Unicode characters. There are currently none
  9. // defined outside the BMP, so we can use char16_t here. Unused trailing
  10. // positions in mMappedChars are set to 0.
  11. struct MultiCharMapping {
  12. char16_t mOriginalChar;
  13. char16_t mMappedChars[3];
  14. };
  15. // Return a pointer to the special case mapping for the given character;
  16. // returns nullptr if no such mapping is defined.
  17. const MultiCharMapping* SpecialUpper(uint32_t aCh);
  18. const MultiCharMapping* SpecialLower(uint32_t aCh);
  19. const MultiCharMapping* SpecialTitle(uint32_t aCh);
  20. } // namespace unicode
  21. } // namespace mozilla