Package org.matrix.android.sdk.api.extensions

Functions

Link copied to clipboard
fun StringBuilder.appendNl(str: String): StringBuilder

Append a new line and then the provided string.

Link copied to clipboard
fun String.ensureNotEmpty(): String?

Returns null if the string is empty.

Link copied to clipboard
fun CharSequence.ensurePrefix(prefix: CharSequence): CharSequence
Link copied to clipboard
fun CryptoDeviceInfo.getFingerprintHumanReadable(): String?
Link copied to clipboard
fun CharSequence.isEmail(): Boolean

Check if a CharSequence is an email.

Link copied to clipboard
inline fun List<MetricPlugin>.measureMetric(block: () -> Unit)

Executes the given block while measuring the transaction.

Link copied to clipboard
inline fun List<SpannableMetricPlugin>.measureSpan(    operation: String,     description: String,     block: () -> Unit)

Executes the given block while measuring a span.

Link copied to clipboard
inline fun List<SpannableMetricPlugin>.measureSpannableMetric(block: List<SpannableMetricPlugin>.() -> Unit)

Executes the given block while measuring the transaction.

Link copied to clipboard
fun Boolean?.orFalse(): Boolean
Link copied to clipboard
fun Boolean?.orTrue(): Boolean
Link copied to clipboard
fun List<DeviceInfo>.sortByLastSeen(): List<DeviceInfo>
Link copied to clipboard
inline fun <A> tryOrNull(message: String? = null, operation: () -> A): A?

Properties

Link copied to clipboard
val emailAddress: Pattern
Link copied to clipboard
const val emailPattern: String