Logo Search packages:      
Sourcecode: icu version File versions  Download package

int32_t UnicodeSet::span ( const UnicodeString s,
int32_t  start,
USetSpanCondition  spanCondition 
) const [inline]

Returns the end of the substring of the input string according to the USetSpanCondition. Same as start+span(s.getBuffer()+start, s.length()-start, spanCondition) after pinning start to 0<=start<=s.length().

Parameters:
s the string
start the start index in the string for the span operation
spanCondition specifies the containment condition
Returns:
the exclusive end of the substring according to the spanCondition; the substring s.tempSubStringBetween(start, end) fulfills the spanCondition ICU 4.4
See also:
USetSpanCondition

Definition at line 1651 of file uniset.h.

References UnicodeString::getBuffer(), UnicodeString::length(), and span().

                                                                                                            {
    int32_t sLength=s.length();
    if(start<0) {
        start=0;
    } else if(start>sLength) {
        start=sLength;
    }
    return start+span(s.getBuffer()+start, sLength-start, spanCondition);
}


Generated by  Doxygen 1.6.0   Back to index