X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..f59164e3d128c7675a4d3934206346a3384e53a5:/icuSources/i18n/unicode/search.h?ds=inline diff --git a/icuSources/i18n/unicode/search.h b/icuSources/i18n/unicode/search.h index 474ae91e..71bbf2dd 100644 --- a/icuSources/i18n/unicode/search.h +++ b/icuSources/i18n/unicode/search.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2001-2003 IBM and others. All rights reserved. +* Copyright (C) 2001-2011 IBM and others. All rights reserved. ********************************************************************** * Date Name Description * 03/22/2000 helena Creation. @@ -12,7 +12,12 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_COLLATION +/** + * \file + * \brief C++ API: SearchIterator object. + */ + +#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION #include "unicode/uobject.h" #include "unicode/unistr.h" @@ -32,6 +37,7 @@ typedef struct USearch USearch; U_NAMESPACE_BEGIN /** + * * SearchIterator is an abstract base class that provides * methods to search for a pattern within a text string. Instances of * SearchIterator maintain a current position and scans over the @@ -300,12 +306,12 @@ public: int32_t first(UErrorCode &status); /** - * Returns the first index greater than position at which the + * Returns the first index equal or greater than position at which the * string text matches the search pattern. The iterator is adjusted so * that its current index (as returned by getOffset) is the - * match position if one was found. If a match is not found, - * USEARCH_DONE will be returned and the iterator will be - * adjusted to the index USEARCH_DONE + * match position if one was found. + * If a match is not found, USEARCH_DONE will be returned and the + * iterator will be adjusted to the index USEARCH_DONE. * @param position where search if to start from. If position is less * than or greater than the text range for searching, * an U_INDEX_OUTOFBOUNDS_ERROR will be returned @@ -340,6 +346,12 @@ public: * position if one was found. If a match is not found, * USEARCH_DONE will be returned and the iterator will be * adjusted to the index USEARCH_DONE + *

+ * When USEARCH_OVERLAP option is off, the last index of the + * result match is always less than position. + * When USERARCH_OVERLAP is on, the result match may span across + * position. + * * @param position where search is to start from. If position is less * than or greater than the text range for searching, * an U_INDEX_OUTOFBOUNDS_ERROR will be returned