create
Creates a NotBlankString from the string representation of the specified value, or throws an IllegalArgumentException if its string representation is blank.
Here's an example of calling this function from Kotlin code:
val text: NotBlankString = NotBlankString.create("Kotools Types")
println(text) // Kotools Types
Content copied to clipboard
The NotBlankString type being an inline value class, this function is not available yet for Java users.
You can use the NotBlankString.Companion.createOrNull function for returning null
instead of throwing an exception in case of invalid value.