Specialize Progression first/last/OrNull functions #KT-42178

This commit is contained in:
Abduqodiri Qurbonzoda
2022-02-07 17:13:59 +03:00
committed by Space
parent cca2680c7f
commit 42c9a27b8a
16 changed files with 513 additions and 39 deletions
@@ -63,8 +63,9 @@ public inline fun CharSequence.findLast(predicate: (Char) -> Boolean): Char? {
}
/**
* Returns first character.
* @throws [NoSuchElementException] if the char sequence is empty.
* Returns the first character.
*
* @throws NoSuchElementException if the char sequence is empty.
*/
public fun CharSequence.first(): Char {
if (isEmpty())