Lines Matching refs:span

47  * contains(c), containsNone(...), span(...), spanBack(...) etc.
1130 // Optimize contains() and span() and similar functions.
1137 // all strings are irrelevant for span() etc. because
1151 * @param spanCondition The span condition
1152 * @return the length of the span
1155 public int span(CharSequence s, SpanCondition spanCondition) {
1156 return span(s, 0, spanCondition);
1161 * If the start index is less than 0, span will start from 0.
1162 * If the start index is greater than the string length, span returns the string length.
1165 * @param start The start index that the span begins
1166 * @param spanCondition The span condition
1167 * @return the string index which ends the span (i.e. exclusive)
1170 public int span(CharSequence s, int start, SpanCondition spanCondition) {
1178 // Frozen set without strings, or no string is relevant for span().
1179 return bmpSet.span(s, start, spanCondition, null);
1182 return stringSpan.span(s, start, spanCondition);
1188 return strSpan.span(s, start, spanCondition);
1196 * Same as span() but also counts the smallest number of set elements on any path across the span.
1199 * @return the limit (exclusive end) of the span
1216 return bmpSet.span(s, start, spanCondition, outCount);
1256 * @param spanCondition The span condition
1257 * @return The string index which starts the span (i.e. inclusive).
1317 * Argument values for whether span() and similar functions continue while the current character is contained vs.
1325 * <li>span() and spanBack() partition any string the
1326 * same way when alternating between span(NOT_CONTAINED) and span(either "contained" condition).
1328 * complemented (inverted) set and the opposite span conditions yields the same results.
1335 * Therefore, complementing both the set and the span conditions may yield different results.
1337 * at different positions in a string (span(s, ...) vs. span(s+1, ...)) the ends of the spans may be different
1339 * <li>span(SIMPLE) may be shorter than
1340 * span(CONTAINED) because it will not recursively try all possible paths. For example, with a set which
1341 * contains the three strings "xy", "xya" and "ax", span("xyax", CONTAINED) will return 4 but span("xyax",
1342 * SIMPLE) will return 3. span(SIMPLE) will never be longer than span(CONTAINED).
1343 * <li>With either "contained" condition, span() and spanBack() may partition a string in different ways. For example,
1344 * with a set which contains the two strings "ab" and "ba", and when processing the string "aba", span() will yield
1348 * either only span() should be used and the boundaries cached for backward operation, or an ICU BreakIterator could
1358 * Continues a span() while there is no set element at the current position.
1363 * When span() returns, the substring between where it started and the position it returned consists only of
1364 * characters that are not in the set, and none of its strings overlap with the span.
1374 * When span() returns, the substring between where it started and the position it returned consists only of set
1377 * If a set contains strings, then the span will be the longest substring for which there
1387 * Continues a span() while there is a set element at the current position.
1391 * When span() returns, the substring between where it started and the position it returned consists only of set
1396 * If a set contains strings, then the span will be the longest substring with a match at each position with the
1399 * Use this span condition together with other longest-match algorithms, such as ICU converters