SplitPattern

open class SplitPattern(    text: String,     delimiters: String = ",",     removeTrailingAsterisks: Boolean = true)

Splits given text into parts and provides testing utilities for its elements. Basic use cases are to specify different function or class names in the detekt yaml config and test for their appearance in specific rules.

Constructors

Link copied to clipboard
fun SplitPattern(    text: String,     delimiters: String = ",",     removeTrailingAsterisks: Boolean = true)

Functions

Link copied to clipboard
fun any(value: String?): Boolean

Is there any element which matches the given value?

Link copied to clipboard
fun contains(value: String?): Boolean

Does any part contain given value?

Link copied to clipboard
fun <T> mapAll(transform: (String) -> T): List<T>

Transforms all parts by given transform function.

Link copied to clipboard
fun matches(value: String): List<String>

Finds all parts which match the given value.

Link copied to clipboard
fun none(value: String): Boolean

Tests if none of the parts contain the given value.

Link copied to clipboard
fun startWith(value: String?): Boolean

Tests if any part starts with the given value

Inheritors

Link copied to clipboard