ICU-10286 API docs update (commit missed from yesterday), remove stray printf

X-SVN-Rev: 35363
This commit is contained in:
Steven R. Loomis 2014-03-06 18:38:08 +00:00
parent f4fe9b638e
commit ded9162807
2 changed files with 22 additions and 17 deletions

View File

@ -358,7 +358,7 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
if(revCount>0) {
backwardsTrie.adoptInstead(builder->build(USTRINGTRIE_BUILD_FAST, status));
if(U_FAILURE(status)) {
printf("Error %s building backwards\n", u_errorName(status));
//printf("Error %s building backwards\n", u_errorName(status));
return NULL;
}
}
@ -366,7 +366,7 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
if(fwdCount>0) {
forwardsPartialTrie.adoptInstead(builder2->build(USTRINGTRIE_BUILD_FAST, status));
if(U_FAILURE(status)) {
printf("Error %s building forwards\n", u_errorName(status));
//printf("Error %s building forwards\n", u_errorName(status));
return NULL;
}
}

View File

@ -21,7 +21,7 @@ U_NAMESPACE_BEGIN
/**
* The BreakIteratorFilter is used to modify the behavior of a BreakIterator
* by constructing a new BreakIterator which skips certain breaks as "exceptions".
* by constructing a new BreakIterator which suppresses certain segment boundaries.
* See http://www.unicode.org/reports/tr35/tr35-general.html#Segmentation_Exceptions .
* For example, a typical English Sentence Break Iterator would break on the space
* in the string "Mr. Smith" (resulting in two segments),
@ -51,38 +51,43 @@ class U_I18N_API FilteredBreakIteratorBuilder : public UObject {
static FilteredBreakIteratorBuilder *createInstance(const Locale& where, UErrorCode& status);
/**
* Construct an empty FilteredBreakIteratorBuilder. It will have an empty
* exception list.
* Construct an empty FilteredBreakIteratorBuilder.
* In this state, it will not suppress any segment boundaries.
* @param status The error code.
* @return the new builder
*/
static FilteredBreakIteratorBuilder *createInstance(UErrorCode &status);
/**
* Add an exception. The break iterator will not break after this string.
* @param exception the exception string
* Suppress a certain string from being the end of a segment.
* For example, suppressing "Mr.", then segments ending in "Mr." will not be returned
* by the iterator.
* @param string the string to suppress, such as "Mr."
* @param status error code
* @return returns TRUE if the exception was not present and added,
* FALSE if the call was a no-op because the exception was already present.
* @return returns TRUE if the string was not present and now added,
* FALSE if the call was a no-op because the string was already being suppressed.
*/
virtual UBool suppressBreakAfter(const UnicodeString& exception, UErrorCode& status) = 0;
virtual UBool suppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
/**
* Remove a single exception.
* Stop suppressing a certain string from being the end of the segment.
* This function does not create any new segment boundaries, but only serves to un-do
* the effect of earlier calls to suppressBreakAfter, or to un-do the effect of
* locale data which may be suppressing certain strings.
* @param exception the exception to remove
* @param status error code
* @return returns TRUE if the exception was present and removed,
* FALSE if the call was a no-op because the exception was not present.
* @return returns TRUE if the string was present and now removed,
* FALSE if the call was a no-op because the string was not being suppressed.
*/
virtual UBool unsuppressBreakAfter(const UnicodeString& exception, UErrorCode& status) = 0;
virtual UBool unsuppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
/**
* build a BreakIterator from this builder.
* Wrap (adopt) an existing break iterator in a new filtered instance.
* The resulting BreakIterator is owned by the caller.
* The BreakIteratorFilter may be destroyed before the BreakIterator is.
* The BreakIteratorFilter may be destroyed before the BreakIterator is destroyed.
* Note that the adoptBreakIterator is adopted by the new BreakIterator
* and should no longer be used by the caller.
* The FilteredBreakIteratorBuilder may be reused.
* @param adoptBreakIterator the break iterator to adopt
* @param status error code
* @return the new BreakIterator, owned by the caller.