Attempt to fix SQLite crash in migration.

This commit is contained in:
Greyson Parrelli
2022-12-13 10:59:27 -05:00
parent 4990778a97
commit 21a8434e4d
3 changed files with 20 additions and 5 deletions

View File

@@ -21,3 +21,20 @@ fun String.asListContains(item: String): Boolean {
.map { it.substring(0, it.length - 1) }
.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 = " ")
}