ICU-11030 clarify USetSpanCondition

X-SVN-Rev: 36221
This commit is contained in:
Markus Scherer 2014-08-21 00:53:31 +00:00
parent 77bd7a5153
commit cd3d93b5e6

View File

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 2002-2012, International Business Machines
* Copyright (C) 2002-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -98,8 +98,8 @@ enum {
*
* The functionality is straightforward for sets with only single code points,
* without strings (which is the common case):
* - USET_SPAN_CONTAINED and USET_SPAN_SIMPLE
* work the same.
* - USET_SPAN_CONTAINED and USET_SPAN_SIMPLE work the same.
* - USET_SPAN_CONTAINED and USET_SPAN_SIMPLE are inverses of USET_SPAN_NOT_CONTAINED.
* - span() and spanBack() partition any string the same way when
* alternating between span(USET_SPAN_NOT_CONTAINED) and
* span(either "contained" condition).
@ -149,7 +149,8 @@ enum {
*/
typedef enum USetSpanCondition {
/**
* Continue a span() while there is no set element at the current position.
* Continues a span() while there is no set element at the current position.
* Increments by one code point at a time.
* Stops before the first set element (character or string).
* (For code points only, this is like while contains(current)==FALSE).
*
@ -161,22 +162,23 @@ typedef enum USetSpanCondition {
*/
USET_SPAN_NOT_CONTAINED = 0,
/**
* Continue a span() while there is a set element at the current position.
* Spans the longest substring that is a concatenation of set elements (characters or strings).
* (For characters only, this is like while contains(current)==TRUE).
*
* When span() returns, the substring between where it started and the position
* it returned consists only of set elements (characters or strings) that are in the set.
*
* If a set contains strings, then the span will be the longest substring
* matching any of the possible concatenations of set elements (characters or strings).
* (There must be a single, non-overlapping concatenation of characters or strings.)
* This is equivalent to a POSIX regular expression for (OR of each set element)*.
* If a set contains strings, then the span will be the longest substring for which there
* exists at least one non-overlapping concatenation of set elements (characters or strings).
* This is equivalent to a POSIX regular expression for <code>(OR of each set element)*</code>.
* (Java/ICU/Perl regex stops at the first match of an OR.)
*
* @stable ICU 3.8
*/
USET_SPAN_CONTAINED = 1,
/**
* Continue a span() while there is a set element at the current position.
* Continues a span() while there is a set element at the current position.
* Increments by the longest matching element at each position.
* (For characters only, this is like while contains(current)==TRUE).
*
* When span() returns, the substring between where it started and the position