toLocalTimeOrNull
Produce a LocalTime from the given strings value and pattern if possible.
Example:
"21->15->0".toLocalTime("HH->mm->ss") // 21:15
"Sun Aug 07 16:37:42 IRDT 2022".toLocalTime() // 16:37:42
"21:10:00".toLocalTime("HH::mm") // null
Content copied to clipboard
Since
1.1.0
Return
A nullable LocalTime parsed from the string.