toLocalTime

fun String.toLocalTime(vararg formats: String?): LocalTime?

Works off of String representations of time, without date, nor time zone. When formats are provided, each format is attempted in-order until one succeeds.

Return

LocalTime? Null means couldn't parse, else parsed LocalTime.

Parameters

this

String representation of LocalTime.

formats

String? vararg of formats to attempt when parsing.