From 2b7d6e62aaa1094e168571f53dc3448ef8c5c5b0 Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Thu, 7 Jun 2012 16:57:51 +0000 Subject: [PATCH] ICU-9360 update break iterator api docs. X-SVN-Rev: 31916 --- icu4c/source/common/unicode/brkiter.h | 22 ++++++++++++---------- icu4c/source/common/unicode/ubrk.h | 17 ++++++++--------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/icu4c/source/common/unicode/brkiter.h b/icu4c/source/common/unicode/brkiter.h index c3f6f563b51..646f33f9696 100644 --- a/icu4c/source/common/unicode/brkiter.h +++ b/icu4c/source/common/unicode/brkiter.h @@ -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 */ diff --git a/icu4c/source/common/unicode/ubrk.h b/icu4c/source/common/unicode/ubrk.h index 5dcb49aa735..c236b4486af 100644 --- a/icu4c/source/common/unicode/ubrk.h +++ b/icu4c/source/common/unicode/ubrk.h @@ -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 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. * This is not the same as the last character. * @param bi The break iterator to use. * @return The character offset immediately beyond 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. -- 2.40.0