Note about all() result on empty collections KT-54835
This commit is contained in:
committed by
Space Team
parent
77e03bb769
commit
0d0cc9250b
@@ -1054,6 +1054,10 @@ public fun CharSequence.withIndex(): Iterable<IndexedValue<Char>> {
|
||||
/**
|
||||
* Returns `true` if all characters match the given [predicate].
|
||||
*
|
||||
* Note that if the char sequence contains no characters, the function returns `true`
|
||||
* because there are no characters in it that _do not_ match the predicate.
|
||||
* See a more detailed explanation of this logic concept in ["Vacuous truth"](https://en.wikipedia.org/wiki/Vacuous_truth) article.
|
||||
*
|
||||
* @sample samples.collections.Collections.Aggregates.all
|
||||
*/
|
||||
public inline fun CharSequence.all(predicate: (Char) -> Boolean): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user