From 8243acd69e6aa88be986269b520461697c54df8f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 17 Jun 2022 02:51:22 +0600 Subject: [PATCH] regularln --- CHANGELOG.md | 2 ++ .../tgbotapi/types/message/textsources/RegularTextSource.kt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2267be580d..c1693d3fcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 2.0.3 +* `Core`: + * New function `regularln` for simple creating of `RegularTextSource` with new line in the end * `Versions`: * `MicroUtils`: `0.11.0` -> `0.11.3` diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/textsources/RegularTextSource.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/textsources/RegularTextSource.kt index ce6f65b086..4593f54121 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/textsources/RegularTextSource.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/textsources/RegularTextSource.kt @@ -18,3 +18,6 @@ data class RegularTextSource @RiskFeature(DirectInvocationOfTextSourceConstructo @Suppress("NOTHING_TO_INLINE") inline fun regular(text: String) = RegularTextSource(text) + +@Suppress("NOTHING_TO_INLINE") +inline fun regularln(text: String) = regular("$text\n")