NotBlankString

@Serializable(with = NotBlankStringSerializer::class)
interface NotBlankString : Comparable<NotBlankString>

Deprecated

Use the kotools.types.NotBlankString type instead.

Replace with

import kotools.types.NotBlankString
NotBlankString

Representation of strings that have at least one character, excluding whitespaces.

Types

Link copied to clipboard
object Companion

Contains declarations for holding or building a PositiveInt.

Link copied to clipboard

Error thrown when creating a NotBlankString fails.

Functions

Link copied to clipboard
open operator fun compareTo(other: String): Int
open operator override fun compareTo(other: NotBlankString): Int

Compares this value lexicographically with the other value for order. Returns zero if this value equals the other value, a negative number if this value is less than the other value, or a positive number if this value is greater than the other value.

Link copied to clipboard
open operator fun get(index: PositiveInt): Char

Returns the character of this value at the specified index. Throws an IndexOutOfBoundsException if the index is out of bounds, except in Kotlin/JS where the behavior is unspecified.

Link copied to clipboard
open operator fun plus(other: Any?): NotBlankString

Returns the concatenation of this value with the string representation of the other object.

Properties

Link copied to clipboard
open val first: Char

Returns the first character of this value.

Link copied to clipboard

Returns the length of this value.

Link copied to clipboard
abstract val value: String

The value to hold.

Extensions

Link copied to clipboard
infix fun NotBlankString.getOrNull(index: PositiveInt): Char?

Returns the character of this value at the specified index, or returns null if the index is out of bounds.