I have another question, given a class: ``` data c...
# announcements
a
I have another question, given a class:
Copy code
data class GeoLocation(val lat: Float, val lon: Float) {
  constructor(value: String) : this(parseFloat(value.substringBefore(" ")), parseFloat(value.substringAfter(" ")))
}
how to change it to avoid looking for " " in value twice, e.g. use an intermediate variable, e.g. val parts = value.split(" ")