The text_transform()
function adjusts the case of text in a tag element.
Arguments
- x
A tag element or .style pronoun.
- transform
A character string specifying the transform. One of,
"uppercase"
"lowercase"
"capitalize"
See also
Other text utilities:
text_alignment()
,
text_break()
,
text_color()
,
text_decoration()
,
text_height()
,
text_selection()
,
text_style()
,
text_weight()
,
text_wrap()
Examples
library(htmltools)
div(
.style %>%
text_transform("lowercase"),
"TRANSFORMED TO LOWERCASE"
)
#> <div class="text-lowercase">TRANSFORMED TO LOWERCASE</div>
div(
.style %>%
text_color(theme_warning()) %>%
text_transform("uppercase"),
"transformed to uppercase"
)
#> <div class="text-warning text-uppercase">transformed to uppercase</div>