plus

@ExperimentalSince(version = KotoolsTypesVersion.V4_4_0)
operator fun NotBlankString.plus(other: String): NotBlankString

Concatenates this string with the other one.

Here's an example of calling this function from Kotlin code:

val first: NotBlankString = "hello".toNotBlankString()
.getOrThrow()
val second = " world"
val result: NotBlankString = first + second
println(result) // hello world

Please note that this function is not available yet for Java users.


@ExperimentalSince(version = KotoolsTypesVersion.V4_4_0)
operator fun NotBlankString.plus(other: NotBlankString): NotBlankString

Concatenates this string with the other one.

Here's an example of calling this function from Kotlin code:

val first: NotBlankString = "hello".toNotBlankString()
.getOrThrow()
val second: NotBlankString = " world".toNotBlankString()
.getOrThrow()
val result: NotBlankString = first + second
println(result) // hello world

Please note that this function is not available yet for Java users.


@ExperimentalSince(version = KotoolsTypesVersion.V4_4_0)
operator fun NotBlankString.plus(other: Char): NotBlankString

Concatenates this string with the other character.

Here's an example of calling this function from Kotlin code:

val first: NotBlankString = "hell".toNotBlankString()
.getOrThrow()
val result: NotBlankString = first + 'o'
println(result) // hello

Please note that this function is not available yet for Java users.


@ExperimentalSince(version = KotoolsTypesVersion.V4_4_0)
operator fun Char.plus(other: NotBlankString): NotBlankString

Concatenates this character with the other string.

Here's an example of calling this function from Kotlin code:

val first = 'a'
val second: NotBlankString = " book".toNotBlankString()
.getOrThrow()
val result: NotBlankString = first + second
println(result) // a book

Please note that this function is not available yet for Java users.