getOrDefault

fun getOrDefault(key: String, default: String): String

Gets the value of the given key, or sets the given default value if the key doesn't exist

Return

the value of the key if it exists, the default value otherwise

Parameters

key

the key to get the value of

default

the default value to return if the key doesn't exist