]> granicus.if.org Git - icu/commitdiff
ICU-11638 Improve RegexMatcher::group() API docs.
authorAndy Heninger <andy.heninger@gmail.com>
Mon, 13 Apr 2015 21:59:04 +0000 (21:59 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Mon, 13 Apr 2015 21:59:04 +0000 (21:59 +0000)
X-SVN-Rev: 37327

icu4c/source/i18n/unicode/regex.h

index c3c6441b6f8cb4ff632a878a73088d48a43fe574..1e23905a3abc8f6589556900918f0ba3f63525cb 100644 (file)
@@ -881,6 +881,11 @@ public:
     *    Returns a string containing the text captured by the given group
     *    during the previous match operation.  Group(0) is the entire match.
     *
+    *    A zero length string is returned both for capture groups that did not
+    *    participate in the match and for actual zero length matches.
+    *    To distinguish between these two cases use the function start(),
+    *    which returns -1 for non-participating groups.
+    *
     *    @param groupNum the capture group number
     *    @param   status     A reference to a UErrorCode to receive any errors.
     *                        Possible errors are  U_REGEX_INVALID_STATE if no match
@@ -919,6 +924,11 @@ public:
     *   Returns a shallow clone of the entire live input string with the UText current native index
     *   set to the beginning of the requested group.
     *
+    *   A group length of zero is returned both for capture groups that did not
+    *   participate in the match and for actual zero length matches.
+    *   To distinguish between these two cases use the function start(),
+    *   which returns -1 for non-participating groups.
+    *
     *   @param   groupNum   The capture group number.
     *   @param   dest        The UText into which the input should be cloned, or NULL to create a new UText.
     *   @param   group_len   A reference to receive the length of the desired capture group