Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: source/common/uprops.cpp

Issue 1864463002: Add Emoji properties (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/common/uprops.h ('k') | source/data/in/pnames.icu » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ******************************************************************************* 2 *******************************************************************************
3 * 3 *
4 * Copyright (C) 2002-2014, International Business Machines 4 * Copyright (C) 2002-2016, International Business Machines
5 * Corporation and others. All Rights Reserved. 5 * Corporation and others. All Rights Reserved.
6 * 6 *
7 ******************************************************************************* 7 *******************************************************************************
8 * file name: uprops.cpp 8 * file name: uprops.cpp
9 * encoding: US-ASCII 9 * encoding: US-ASCII
10 * tab size: 8 (not used) 10 * tab size: 8 (not used)
11 * indentation:4 11 * indentation:4
12 * 12 *
13 * created on: 2002feb24 13 * created on: 2002feb24
14 * created by: Markus W. Scherer 14 * created by: Markus W. Scherer
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 { UPROPS_SRC_CHAR, 0, isPOSIX_graph }, 263 { UPROPS_SRC_CHAR, 0, isPOSIX_graph },
264 { UPROPS_SRC_CHAR, 0, isPOSIX_print }, 264 { UPROPS_SRC_CHAR, 0, isPOSIX_print },
265 { UPROPS_SRC_CHAR, 0, isPOSIX_xdigit }, 265 { UPROPS_SRC_CHAR, 0, isPOSIX_xdigit },
266 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CASED 266 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CASED
267 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CASE_IGNORABL E 267 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CASE_IGNORABL E
268 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CHANGES_WHEN_ LOWERCASED 268 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CHANGES_WHEN_ LOWERCASED
269 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CHANGES_WHEN_ UPPERCASED 269 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CHANGES_WHEN_ UPPERCASED
270 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CHANGES_WHEN_ TITLECASED 270 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CHANGES_WHEN_ TITLECASED
271 { UPROPS_SRC_CASE_AND_NORM, 0, changesWhenCasefolded }, 271 { UPROPS_SRC_CASE_AND_NORM, 0, changesWhenCasefolded },
272 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CHANGES_WHEN_ CASEMAPPED 272 { UPROPS_SRC_CASE, 0, caseBinaryPropertyContains }, // UCHAR_CHANGES_WHEN_ CASEMAPPED
273 { UPROPS_SRC_NFKC_CF, 0, changesWhenNFKC_Casefolded } 273 { UPROPS_SRC_NFKC_CF, 0, changesWhenNFKC_Casefolded },
274 { 2, U_MASK(UPROPS_2_EMOJI), defaultContains },
275 { 2, U_MASK(UPROPS_2_EMOJI_PRESENTATION), defaultContains },
276 { 2, U_MASK(UPROPS_2_EMOJI_MODIFIER), defaultContains },
277 { 2, U_MASK(UPROPS_2_EMOJI_MODIFIER_BASE), defaultContains },
274 }; 278 };
275 279
276 U_CAPI UBool U_EXPORT2 280 U_CAPI UBool U_EXPORT2
277 u_hasBinaryProperty(UChar32 c, UProperty which) { 281 u_hasBinaryProperty(UChar32 c, UProperty which) {
278 /* c is range-checked in the functions that are called from here */ 282 /* c is range-checked in the functions that are called from here */
279 if(which<UCHAR_BINARY_START || UCHAR_BINARY_LIMIT<=which) { 283 if(which<UCHAR_BINARY_START || UCHAR_BINARY_LIMIT<=which) {
280 /* not a known binary property */ 284 /* not a known binary property */
281 return FALSE; 285 return FALSE;
282 } else { 286 } else {
283 const BinaryProperty &prop=binProps[which]; 287 const BinaryProperty &prop=binProps[which];
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 UnicodeString kc2=nfkc->normalize(folded2String.foldCase(), *pErrorCode); 601 UnicodeString kc2=nfkc->normalize(folded2String.foldCase(), *pErrorCode);
598 // if (c != b) add the mapping from a to c 602 // if (c != b) add the mapping from a to c
599 if(U_FAILURE(*pErrorCode) || kc1==kc2) { 603 if(U_FAILURE(*pErrorCode) || kc1==kc2) {
600 return u_terminateUChars(dest, destCapacity, 0, pErrorCode); 604 return u_terminateUChars(dest, destCapacity, 0, pErrorCode);
601 } else { 605 } else {
602 return kc2.extract(dest, destCapacity, *pErrorCode); 606 return kc2.extract(dest, destCapacity, *pErrorCode);
603 } 607 }
604 } 608 }
605 609
606 #endif 610 #endif
OLDNEW
« no previous file with comments | « source/common/uprops.h ('k') | source/data/in/pnames.icu » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698