Show some more info in the about sheet.

This commit is contained in:
Greyson Parrelli
2024-02-13 12:27:09 -05:00
committed by Cody Henthorne
parent 47cdc50a81
commit 57ac7cb328
7 changed files with 251 additions and 58 deletions

View File

@@ -1,5 +1,8 @@
package org.signal.core.util
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.contract
/**
* Treats the string as a serialized list of tokens and tells you if an item is present in the list.
* In addition to exact matches, this handles wildcards at the end of an item.
@@ -55,6 +58,10 @@ fun String?.nullIfBlank(): String? {
}
}
@OptIn(ExperimentalContracts::class)
fun CharSequence?.isNotNullOrBlank(): Boolean {
contract {
returns(true) implies (this@isNotNullOrBlank != null)
}
return !this.isNullOrBlank()
}