withStrikethrough
inline fun <R : Any> OudsAnnotatedString.StrikethroughBuilder.withStrikethrough(block: OudsAnnotatedString.StrikethroughBuilder.() -> R): R
DSL helper for applying strikethrough formatting to a block of text.
This is the recommended way to add strikethrough formatting as it automatically manages the annotation stack.
Example:
buildOudsAnnotatedBodyText {
append("Original price: ")
withStrikethrough {
append("$100")
}
append(" Now: $80")
}Content copied to clipboard
Return
The result of the block.
Parameters
block
The lambda that appends the text to be formatted with strikethrough.