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

Unified Diff: source/common/uinvchar.h

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/common/uinit.cpp ('k') | source/common/ulistformatter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/uinvchar.h
diff --git a/source/common/uinvchar.h b/source/common/uinvchar.h
index f307bd6a6296eccb05ef45a3ee7f5eb2be9a72a4..1a9aa78d54e6518e661694a52114066ef418dcf7 100644
--- a/source/common/uinvchar.h
+++ b/source/common/uinvchar.h
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 1999-2010, International Business Machines
+* Copyright (C) 1999-2015, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -21,6 +21,9 @@
#define __UINVCHAR_H__
#include "unicode/utypes.h"
+#ifdef __cplusplus
+#include "unicode/unistr.h"
+#endif
/**
* Check if a char string only contains invariant characters.
@@ -48,6 +51,22 @@ uprv_isInvariantString(const char *s, int32_t length);
U_INTERNAL UBool U_EXPORT2
uprv_isInvariantUString(const UChar *s, int32_t length);
+#ifdef __cplusplus
+
+/**
+ * Check if a UnicodeString only contains invariant characters.
+ * See utypes.h for details.
+ *
+ * @param s Input string.
+ * @return TRUE if s contains only invariant characters.
+ */
+U_INTERNAL inline UBool U_EXPORT2
+uprv_isInvariantUnicodeString(const icu::UnicodeString &s) {
+ return uprv_isInvariantUString(s.getBuffer(), s.length());
+}
+
+#endif /* __cplusplus */
+
/**
* \def U_UPPER_ORDINAL
* Get the ordinal number of an uppercase invariant character
« no previous file with comments | « source/common/uinit.cpp ('k') | source/common/ulistformatter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698