christophsturm
08/11/2021, 2:07 PM/**
* @return a string that contains only the lines containing @param pattern.
* useful when doing contains assertions on really huge strings to make the error message easier to read
*/
private fun String?.grep(pattern: String): String {
if (this == null)
return ""
return lineSequence().filter { it.contains(pattern) }.joinToString("\n")
}
be part of strikt?