https://kotlinlang.org logo
#codereview
Title
# codereview
e

Ellen Spertus

03/09/2020, 5:38 PM
Is there a better way of writing this?
Copy code
internal fun getString(key: String): String? {
    val (tableName, fieldName) = splitDottedString(key)
    return getString(tableName, fieldName)
}
I suppose since I wrote
getString()
, I could create an overloaded version that takes a pair as an argument. I think that’s probably the best thing to do, unless you all know some Kotlin trick that I don’t.
4 Views