]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/unicode/regex.h
ICU-62141.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / unicode / regex.h
index 40e10eba5d4683aa18a126c0e1950b6427a03643..8e3b1cb30f7cc4f8ef4dfd2ad1b9188773c2e918 100644 (file)
@@ -1,10 +1,12 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 **********************************************************************
 *   Copyright (C) 2002-2016, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 **********************************************************************
 *   file name:  regex.h
-*   encoding:   US-ASCII
+*   encoding:   UTF-8
 *   indentation:4
 *
 *   created on: 2002oct22
@@ -57,6 +59,7 @@
 
 struct UHashtable;
 
+#if U_SHOW_CPLUSPLUS_API
 U_NAMESPACE_BEGIN
 
 struct Regex8BitSet;
@@ -348,17 +351,17 @@ public:
 private:
     /**
      * Cause a compilation error if an application accidentally attempts to
-     *   create a matcher with a (UChar *) string as input rather than
+     *   create a matcher with a (char16_t *) string as input rather than
      *   a UnicodeString.  Avoids a dangling reference to a temporary string.
      * <p>
-     * To efficiently work with UChar *strings, wrap the data in a UnicodeString
+     * To efficiently work with char16_t *strings, wrap the data in a UnicodeString
      * using one of the aliasing constructors, such as
-     * <code>UnicodeString(UBool isTerminated, const UChar *text, int32_t textLength);</code>
+     * <code>UnicodeString(UBool isTerminated, const char16_t *text, int32_t textLength);</code>
      * or in a UText, using
-     * <code>utext_openUChars(UText *ut, const UChar *text, int64_t textLength, UErrorCode *status);</code>
+     * <code>utext_openUChars(UText *ut, const char16_t *text, int64_t textLength, UErrorCode *status);</code>
      *
      */
-    RegexMatcher *matcher(const UChar *input,
+    RegexMatcher *matcher(const char16_t *input,
         UErrorCode          &status) const;
 public:
 
@@ -746,17 +749,17 @@ public:
 private:
     /**
      * Cause a compilation error if an application accidentally attempts to
-     *   create a matcher with a (UChar *) string as input rather than
+     *   create a matcher with a (char16_t *) string as input rather than
      *   a UnicodeString.    Avoids a dangling reference to a temporary string.
      * <p>
-     * To efficiently work with UChar *strings, wrap the data in a UnicodeString
+     * To efficiently work with char16_t *strings, wrap the data in a UnicodeString
      * using one of the aliasing constructors, such as
-     * <code>UnicodeString(UBool isTerminated, const UChar *text, int32_t textLength);</code>
+     * <code>UnicodeString(UBool isTerminated, const char16_t *text, int32_t textLength);</code>
      * or in a UText, using
-     * <code>utext_openUChars(UText *ut, const UChar *text, int64_t textLength, UErrorCode *status);</code>
+     * <code>utext_openUChars(UText *ut, const char16_t *text, int64_t textLength, UErrorCode *status);</code>
      *
      */
-    RegexMatcher(const UnicodeString &regexp, const UChar *input,
+    RegexMatcher(const UnicodeString &regexp, const char16_t *input,
         uint32_t flags, UErrorCode &status);
 public:
 
@@ -1154,17 +1157,17 @@ public:
 private:
     /**
      * Cause a compilation error if an application accidentally attempts to
-     *   reset a matcher with a (UChar *) string as input rather than
+     *   reset a matcher with a (char16_t *) string as input rather than
      *   a UnicodeString.    Avoids a dangling reference to a temporary string.
      * <p>
-     * To efficiently work with UChar *strings, wrap the data in a UnicodeString
+     * To efficiently work with char16_t *strings, wrap the data in a UnicodeString
      * using one of the aliasing constructors, such as
-     * <code>UnicodeString(UBool isTerminated, const UChar *text, int32_t textLength);</code>
+     * <code>UnicodeString(UBool isTerminated, const char16_t *text, int32_t textLength);</code>
      * or in a UText, using
-     * <code>utext_openUChars(UText *ut, const UChar *text, int64_t textLength, UErrorCode *status);</code>
+     * <code>utext_openUChars(UText *ut, const char16_t *text, int64_t textLength, UErrorCode *status);</code>
      *
      */
-    RegexMatcher &reset(const UChar *input);
+    RegexMatcher &reset(const char16_t *input);
 public:
 
    /**
@@ -1879,5 +1882,7 @@ private:
 };
 
 U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
+
 #endif  // UCONFIG_NO_REGULAR_EXPRESSIONS
 #endif