fun tryParseKey()

in plugin-sdk-core/src/main/kotlin/com/jetbrains/teamcity/plugins/framework/resource/location/windows/registry/WindowsRegistryParser.kt [15:24]


    fun tryParseKey(text: String): WindowsRegistryEntry.Key? {
        val hivePrefix = "HKEY"
        return if (text.startsWith(hivePrefix)) {
            logger.debug("Line matches registry key pattern. Line: $text")
            WindowsRegistryEntry.Key(text)
        } else {
            logger.debug("Line doesn't match registry key pattern. Line: $text")
            null
        }
    }