OudsAnnotatedCodeText

An annotated string for com.orange.ouds.core.component.OudsCodeText text in OUDS components.

This class supports colored text for syntax highlighting in code texts.

Use buildOudsAnnotatedCodeText to create instances:

val highlightColor = OudsTheme.colorScheme.content.brandPrimary
OudsCodeText(
text = buildOudsAnnotatedCodeText {
withColor(color = info) { append("val") }
append(" state = ")
withColor(color = positive) { append("rememberState") }
append("()")
}
)

Types

Properties

Link copied to clipboard
open override val length: Int
Link copied to clipboard

The plain text content without any formatting annotations.

Functions

Link copied to clipboard
fun capitalize(localeList: LocaleList = LocaleList.current): OudsAnnotatedCodeText

Create capitalized OudsAnnotatedString.

Link copied to clipboard
fun decapitalize(localeList: LocaleList = LocaleList.current): OudsAnnotatedCodeText

Create decapitalized OudsAnnotatedString.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open operator override fun get(index: Int): Char
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Concatenates this annotated string with another annotated string.

Link copied to clipboard
open override fun subSequence(startIndex: Int, endIndex: Int): CharSequence
Link copied to clipboard
fun toLowerCase(localeList: LocaleList = LocaleList.current): OudsAnnotatedCodeText

Create lower case transformed OudsAnnotatedString.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun toUpperCase(localeList: LocaleList = LocaleList.current): OudsAnnotatedCodeText

Create upper case transformed OudsAnnotatedString.