byNameOrNull

fun <T : Node> Collection<T>?.byNameOrNull(lookup: String, modifier: SearchModifier): T?

This function returns the first node that matches the name on the supplied list of nodes.


inline fun <T : Declaration> DeclarationHolder.byNameOrNull(name: String, fqn: Boolean = false): T?