commonMain.app.bsky.richtext.facetByteSlice.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky Show documentation
Show all versions of bluesky Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
@file:Suppress("DEPRECATION")
package app.bsky.richtext
import kotlin.Long
import kotlin.Suppress
import kotlinx.serialization.Serializable
/**
* Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is
* exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages,
* like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages,
* convert to byte arrays before working with facets.
*/
@Serializable
public data class FacetByteSlice(
public val byteStart: Long,
public val byteEnd: Long,
) {
init {
require(byteStart >= 0) {
"byteStart must be >= 0, but was $byteStart"
}
require(byteEnd >= 0) {
"byteEnd must be >= 0, but was $byteEnd"
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy