All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.autonomousapps.internal.utils.sequences.kt Maven / Gradle / Ivy

There is a newer version: 2.6.1
Show newest version
// Copyright (c) 2024. Tony Robalik.
// SPDX-License-Identifier: Apache-2.0
package com.autonomousapps.internal.utils

internal fun Sequence.allItems(): List =
  flatMap { matchResult ->
    val groupValues = matchResult.groupValues
    // Ignore the 0th element, as it is the entire match
    if (groupValues.isNotEmpty()) groupValues.subList(1, groupValues.size).asSequence()
    else emptySequence()
  }.toList()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy