Possible fix for SQLite error.

This commit is contained in:
Greyson Parrelli
2023-04-24 16:39:20 -04:00
committed by Nicholas
parent d70213e031
commit 353434e1ef
2 changed files with 20 additions and 2 deletions

View File

@@ -25,3 +25,20 @@ fun String.asListContains(item: String): Boolean {
fun String?.emptyIfNull(): String {
return this ?: ""
}
/**
* 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 = " ")
}