Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Concatenations of NotBlankString #129

Open
5 tasks
LVMVRQUXL opened this issue Dec 16, 2022 · 1 comment
Open
5 tasks

Concatenations of NotBlankString #129

LVMVRQUXL opened this issue Dec 16, 2022 · 1 comment
Labels
common Should work on all platforms. enhancement New feature or request. types Related to Kotools Types library.

Comments

@LVMVRQUXL
Copy link
Contributor

LVMVRQUXL commented Dec 16, 2022

Description

Implement the following operations for concatenating a NotBlankString with another type:

import kotools.types.NotBlankString

operator fun Char.plus(other: NotBlankString): NotBlankString = TODO()
operator fun NotBlankString.plus(other: Char): NotBlankString = TODO()
operator fun NotBlankString.plus(other: String): NotBlankString = TODO()
operator fun NotBlankString.plus(other: NotBlankString): NotBlankString = TODO()

Checklist

@LVMVRQUXL LVMVRQUXL added enhancement New feature or request. common Should work on all platforms. types Related to Kotools Types library. labels Dec 16, 2022
@LVMVRQUXL LVMVRQUXL modified the milestone: Types v4.0.0 Dec 19, 2022
@LVMVRQUXL
Copy link
Contributor Author

LVMVRQUXL commented Dec 21, 2022

For concatenating a NotBlankString with another one easily, we should implement the following functions:

import kotools.types.text.NotBlankString
import kotools.types.text.toNotBlankString

operator fun NotBlankString.plus(other: NotBlankString): NotBlankString = TODO()
operator fun NotBlankString.plus(other: Result<NotBlankString>): Result<NotBlankString> = TODO()
operator fun Result<NotBlankString>.plus(other: NotBlankString): Result<NotBlankString> = TODO()
operator fun Result<NotBlankString>.plus(other: Result<NotBlankString>): Result<NotBlankString> = TODO()

fun main(): Unit = println("hello".toNotBlankString() + " world".toNotBlankString()) // Success(hello world)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
common Should work on all platforms. enhancement New feature or request. types Related to Kotools Types library.
Projects
None yet
Development

No branches or pull requests

1 participant