kotools / libraries

Multiplatform libraries for expressive programming with Kotlin.
https://kotools.github.io/libraries
MIT License
0 stars 0 forks source link

Variants of `toNotBlankString` function #130

Closed LVMVRQUXL closed 1 year ago

LVMVRQUXL commented 1 year ago

Description

Implement the following operations for easying the creation of a NotBlankString type:

inline fun String.toNotBlankStringOrElse(onFailure: (IllegalArgumentException) -> NotBlankString): NotBlankString
fun String.toNotBlankStringOrNull(): NotBlankString?
fun String.toNotBlankStringOrThrow(): NotBlankString

Checklist