Updated on 2026-08-14
This commit is contained in:
parent
3f089ec4c1
commit
8a6e1e6fc9
3 changed files with 18 additions and 15 deletions
|
|
@ -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 = ""))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue