Updated on 2026-08-14

This commit is contained in:
Tangem 2022-07-26 09:28:37 +03:00
parent 3f089ec4c1
commit 8a6e1e6fc9
3 changed files with 18 additions and 15 deletions

View file

@ -19,4 +19,8 @@ fun StringBuilder.appendIfNotNull(value: String?, prefix: String? = null, postfi
fun String.appendIfNotNull(value: String?, prefix: String? = null, postfix: String? = null): String {
return StringBuilder(this).apply { appendIfNotNull(value, prefix, postfix) }.toString()
}
fun StringBuilder.breakLine(count: Int = 1): StringBuilder {
return append(List(count) { "\n" }.joinToString(separator = ""))
}