]> granicus.if.org Git - icu/commitdiff
ICU-9360 update break iterator api docs.
authorAndy Heninger <andy.heninger@gmail.com>
Thu, 7 Jun 2012 16:57:51 +0000 (16:57 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Thu, 7 Jun 2012 16:57:51 +0000 (16:57 +0000)
X-SVN-Rev: 31916

icu4c/source/common/unicode/brkiter.h
icu4c/source/common/unicode/ubrk.h

index c3f6f563b5140ce551da5929b892aa6d3a905f58..646f33f9696a5c4a5ee3906dfb03fdab13cad5be 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ********************************************************************************
-*   Copyright (C) 1997-2011, International Business Machines
+*   Copyright (C) 1997-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 ********************************************************************************
 *
@@ -208,19 +208,21 @@ public:
     };
 
     /**
-     * Return the index of the first character in the text being scanned.
+     * Set the iterator position to the index of the first character in the text being scanned.
+     * @return The index of the first character in the text being scanned.
      * @stable ICU 2.0
      */
     virtual int32_t first(void) = 0;
 
     /**
-     * Return the index immediately BEYOND the last character in the text being scanned.
+     * Set the iterator position to the index immediately BEYOND the last character in the text being scanned.
+     * @return The index immediately BEYOND the last character in the text being scanned.
      * @stable ICU 2.0
      */
     virtual int32_t last(void) = 0;
 
     /**
-     * Return the boundary preceding the current boundary.
+     * Set the iterator position to the boundary preceding the current boundary.
      * @return The character index of the previous text boundary or DONE if all
      * boundaries have been returned.
      * @stable ICU 2.0
@@ -228,7 +230,7 @@ public:
     virtual int32_t previous(void) = 0;
 
     /**
-     * Return the boundary following the current boundary.
+     * Advance the iterator to the boundary following the current boundary.
      * @return The character index of the next text boundary or DONE if all
      * boundaries have been returned.
      * @stable ICU 2.0
@@ -243,7 +245,7 @@ public:
     virtual int32_t current(void) const = 0;
 
     /**
-     * Return the first boundary following the specified offset.
+     * Advance the iterator to the first boundary following the specified offset.
      * The value returned is always greater than the offset or
      * the value BreakIterator.DONE
      * @param offset the offset to begin scanning.
@@ -253,7 +255,7 @@ public:
     virtual int32_t following(int32_t offset) = 0;
 
     /**
-     * Return the first boundary preceding the specified offset.
+     * Set the iterator position to the first boundary preceding the specified offset.
      * The value returned is always smaller than the offset or
      * the value BreakIterator.DONE
      * @param offset the offset to begin scanning.
@@ -273,11 +275,11 @@ public:
     virtual UBool isBoundary(int32_t offset) = 0;
 
     /**
-     * Return the nth boundary from the current boundary
-     * @param n which boundary to return.  A value of 0
+     * Set the iterator position to the nth boundary from the current boundary
+     * @param n the number of boundaries to move by.  A value of 0
      * does nothing.  Negative values move to previous boundaries
      * and positive values move to later boundaries.
-     * @return The index of the nth boundary from the current position, or
+     * @return The new iterator position, or
      * DONE if there are fewer than |n| boundaries in the specfied direction.
      * @stable ICU 2.0
      */
index 5dcb49aa735e000ce252a9335377ee5bbb41fd11..c236b4486afa798315a783714dc9ea0113534c66 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ******************************************************************************
-* Copyright (C) 1996-2011, International Business Machines Corporation and others.
+* Copyright (C) 1996-2012, International Business Machines Corporation and others.
 * All Rights Reserved.
 ******************************************************************************
 */
@@ -342,7 +342,7 @@ U_STABLE int32_t U_EXPORT2
 ubrk_current(const UBreakIterator *bi);
 
 /**
- * Determine the text boundary following the current text boundary.
+ * Advance the iterator to the boundary following the current boundary.
  *
  * @param bi The break iterator to use.
  * @return The character index of the next text boundary, or UBRK_DONE
@@ -354,7 +354,7 @@ U_STABLE int32_t U_EXPORT2
 ubrk_next(UBreakIterator *bi);
 
 /**
- * Determine the text boundary preceding the current text boundary.
+ * Set the iterator position to the boundary preceding the current boundary.
  *
  * @param bi The break iterator to use.
  * @return The character index of the preceding text boundary, or UBRK_DONE
@@ -366,7 +366,7 @@ U_STABLE int32_t U_EXPORT2
 ubrk_previous(UBreakIterator *bi);
 
 /**
- * Determine the index of the first character in the text being scanned.
+ * Set the iterator position to the index of the first character in the text being scanned.
  * This is not always the same as index 0 of the text.
  * @param bi The break iterator to use.
  * @return The character index of the first character in the text being scanned.
@@ -377,8 +377,7 @@ U_STABLE int32_t U_EXPORT2
 ubrk_first(UBreakIterator *bi);
 
 /**
- * Determine the index immediately <EM>beyond</EM> the last character in the text being
- * scanned.
+ * Set the iterator position to the index immediately <EM>beyond</EM> the last character in the text being scanned.
  * This is not the same as the last character.
  * @param bi The break iterator to use.
  * @return The character offset immediately <EM>beyond</EM> the last character in the
@@ -390,8 +389,8 @@ U_STABLE int32_t U_EXPORT2
 ubrk_last(UBreakIterator *bi);
 
 /**
- * Determine the text boundary preceding the specified offset.
- * The value returned is always smaller than offset, or UBRK_DONE.
+ * Set the iterator position to the first boundary preceding the specified offset.
+ * The new position is always smaller than offset, or UBRK_DONE.
  * @param bi The break iterator to use.
  * @param offset The offset to begin scanning.
  * @return The text boundary preceding offset, or UBRK_DONE.
@@ -403,7 +402,7 @@ ubrk_preceding(UBreakIterator *bi,
            int32_t offset);
 
 /**
- * Determine the text boundary following the specified offset.
+ * Advance the iterator to the first boundary following the specified offset.
  * The value returned is always greater than offset, or UBRK_DONE.
  * @param bi The break iterator to use.
  * @param offset The offset to begin scanning.