@@ -415,27 +415,28 @@ extension IterableExtension<T> on Iterable<T> {
415415 /// Splits the elements into chunks before some elements.
416416 ///
417417 /// Each element except the first is checked using [test]
418- /// for whether it should start a new chunk.
418+ /// for whether it should be the first element in a new chunk.
419419 /// If so, the elements since the previous chunk-starting element
420420 /// are emitted as a list.
421- /// Any final elements are emitted at the end.
421+ /// Any remaining elements are emitted at the end.
422422 ///
423423 /// Example:
424424 /// Example:
425425 /// ```dart
426- /// var parts = [1, 2, 3, 4 , 5, 6, 7 , 8, 9].split (isPrime);
427- /// print(parts); // ([1], [2 ], [3, 4 ], [5, 6 ], [7, 8, 9])
426+ /// var parts = [1, 0, 2, 1 , 5, 7, 6 , 8, 9].splitBefore (isPrime);
427+ /// print(parts); // ([1, 0 ], [2, 1 ], [5], [7, 6 , 8, 9])
428428 /// ```
429429 Iterable <List <T >> splitBefore (bool Function (T element) test) =>
430430 splitBeforeIndexed ((_, element) => test (element));
431431
432- /// Splits the elements into chunks before some elements.
432+ /// Splits the elements into chunks after some elements.
433433 ///
434- /// Each element is checked using [test] for whether it should start a new
435- /// chunk.
436- /// If so, the elements since the previous chunk-starting element
434+ /// Each element is checked using [test] for whether it should end a chunk.
435+ /// If so, the elements following the previous chunk-ending element,
436+ /// including the element that satisfied [test] ,
437437 /// are emitted as a list.
438- /// Any final elements are emitted at the end.
438+ /// Any remaining elements are emitted at the end,
439+ /// whether the last element should be split after or not.
439440 ///
440441 /// Example:
441442 /// ```dart
@@ -451,7 +452,7 @@ extension IterableExtension<T> on Iterable<T> {
451452 /// for whether a chunk should end between them.
452453 /// If so, the elements since the previous chunk-splitting elements
453454 /// are emitted as a list.
454- /// Any final elements are emitted at the end.
455+ /// Any remaining elements are emitted at the end.
455456 ///
456457 /// Example:
457458 /// ```dart
@@ -467,7 +468,7 @@ extension IterableExtension<T> on Iterable<T> {
467468 /// for whether it should start a new chunk.
468469 /// If so, the elements since the previous chunk-starting element
469470 /// are emitted as a list.
470- /// Any final elements are emitted at the end.
471+ /// Any remaining elements are emitted at the end.
471472 ///
472473 /// Example:
473474 /// ```dart
@@ -498,9 +499,10 @@ extension IterableExtension<T> on Iterable<T> {
498499 ///
499500 /// Each element and index is checked using [test]
500501 /// for whether it should end the current chunk.
501- /// If so, the elements since the previous chunk-ending element
502+ /// If so, the elements since the previous chunk-ending element,
503+ /// includeing the elemenent that satisfied [test] ,
502504 /// are emitted as a list.
503- /// Any final elements are emitted at the end, whether the last
505+ /// Any remaining elements are emitted at the end, whether the last
504506 /// element should be split after or not.
505507 ///
506508 /// Example:
@@ -529,7 +531,7 @@ extension IterableExtension<T> on Iterable<T> {
529531 /// checked using [test] for whether a chunk should end between them.
530532 /// If so, the elements since the previous chunk-splitting elements
531533 /// are emitted as a list.
532- /// Any final elements are emitted at the end.
534+ /// Any remaining elements are emitted at the end.
533535 ///
534536 /// Example:
535537 /// ```dart
0 commit comments