/*
*******************************************************************************
*
-* Copyright (C) 1999-2007, International Business Machines
+* Copyright (C) 1999-2010, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
*/
#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
+/**
+ * Assuming c is a surrogate code point (U16_IS_SURROGATE(c)),
+ * is it a trail surrogate?
+ * @param c 16-bit code unit
+ * @return TRUE or FALSE
+ * @stable ICU 4.2
+ */
+#define U16_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0)
+
/**
* Helper constant for U16_GET_SUPPLEMENTARY.
* @internal
(c)=U16_GET_SUPPLEMENTARY((c), __c2); \
} \
} else { \
- if((i)-1>=(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \
+ if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \
(c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \
} \
} \