Closed
Description
Hi, Sometimes, I need copy method like data class copy. I couldn't find any copy method. So, I created a new method for copy. But, I would expect this to be in the standard library.
I'm curious about your thoughts on this subject.
fun LocalTime.copy(
hour: Int? = null,
minute: Int? = null,
second: Int? = null,
nanoSeconds: Int? = null,
) = LocalTime(
hour = hour ?: this.hour,
minute = minute ?: this.minute,
second = second ?: this.second,
nanosecond = nanoSeconds ?: this.nanosecond
)
Metadata
Metadata
Assignees
Labels
No labels