Skip to content
On this page
Common

KattonComponentApi

top.katton.apicommon/src/main/kotlin/top/katton/api/KattonComponentApi.kt
Combines two nullable Components into a new Component.

plus

plusCommonFunction
kotlin
operator fun Component?.plus(component: Component?): Component

Combines two nullable Components into a new Component.

If either Component is null, it is treated as an empty Component.

Parameters

ParameterDescription
componentThe Component to append

Returns

new Component containing both texts

plus

plusCommonFunction
kotlin
operator fun String?.plus(component: Component?): Component

Combines a nullable String with a nullable Component.

The string is converted to a literal Component before appending.

Parameters

ParameterDescription
componentThe Component to append

Returns

new Component containing both texts

plus

plusCommonFunction
kotlin
operator fun Component?.plus(string: String?): Component

Combines a nullable Component with a nullable String.

The string is converted to a literal Component and prepended to the Component.

Parameters

ParameterDescription
stringThe string to prepend

Returns

new Component containing both texts