mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-24 11:45:28 +00:00
Possible fix for SQLite error.
This commit is contained in:
committed by
Nicholas
parent
d70213e031
commit
353434e1ef
@@ -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 = " ")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user