NotBlankString

@SinceKotools(project = Project.Types, version = "1.2")
interface NotBlankString : Comparable<NotBlankString>

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

Types

Companion
Link copied to clipboard
common
object Companion

Contains declarations for holding or building a PositiveInt.

ConstructionError
Link copied to clipboard
common
@SinceKotools(project = Project.Types, version = "3.0")
class ConstructionError : IllegalArgumentException

Error thrown when creating a NotBlankString fails.

Functions

compareTo
Link copied to clipboard
common
@SinceKotools(project = Project.Types, version = "2.0")
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.

get
Link copied to clipboard
common
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.

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

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

Properties

first
Link copied to clipboard
common
open val first: Char

Returns the first character of this value.

length
Link copied to clipboard
common
open val length: StrictlyPositiveInt

Returns the length of this value.

value
Link copied to clipboard
common
abstract val value: String

The value to hold.

Extensions

getOrNull
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.

native
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.