toEnum

inline fun <T : Enum<T>> String.toEnum(by: (enum: T) -> String = { it.name }): T?

Convert any string value into it's enum value by a given property of the enum