1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/unicharutil/util/nsSpecialCasingData.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,26 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include <stdint.h> 1.9 + 1.10 +namespace mozilla { 1.11 +namespace unicode { 1.12 + 1.13 +// Multi-character mappings (from SpecialCasing.txt) map a single Unicode 1.14 +// value to a sequence of 2 or 3 Unicode characters. There are currently none 1.15 +// defined outside the BMP, so we can use char16_t here. Unused trailing 1.16 +// positions in mMappedChars are set to 0. 1.17 +struct MultiCharMapping { 1.18 + char16_t mOriginalChar; 1.19 + char16_t mMappedChars[3]; 1.20 +}; 1.21 + 1.22 +// Return a pointer to the special case mapping for the given character; 1.23 +// returns nullptr if no such mapping is defined. 1.24 +const MultiCharMapping* SpecialUpper(uint32_t aCh); 1.25 +const MultiCharMapping* SpecialLower(uint32_t aCh); 1.26 +const MultiCharMapping* SpecialTitle(uint32_t aCh); 1.27 + 1.28 +} // namespace unicode 1.29 +} // namespace mozilla