Improve performance from thread being updated to data available to render.

This commit is contained in:
Cody Henthorne
2023-04-14 16:28:56 -04:00
parent 9d17bf473c
commit 4f06a0d27c
39 changed files with 497 additions and 815 deletions

View File

@@ -22,23 +22,6 @@ fun String.asListContains(item: String): Boolean {
.any { item.startsWith(it) }
}
/**
* Turns a multi-line string into a single-line string stripped of indentation, separated by spaces instead of newlines.
*
* e.g.
*
* a
* b
* c
*
* turns into
*
* a b c
*/
fun String.toSingleLine(): String {
return this.trimIndent().split("\n").joinToString(separator = " ")
}
fun String?.emptyIfNull(): String {
return this ?: ""
}