Last chance! 50% off unlimited learning
Sale ends in
Turns on text attributes in terminal, including bold text, italics, underline, etc. Note that not all terminals support each attribute.
attr_on(...)
characters indicating attributes to turn on. "bf"
for bold face; "ft"
for faint; "it"
for italics; "ul"
for underline; "sb"
for slow blink; "fb"
for fast blink; "rv"
for reverse video (invert bg and fg colors); "st"
for strike-through
NULL
Use attr_off
to turn off the attributes.
Other style functions:
attr_off()
,
bg_off()
,
bg_on()
,
color_off()
,
color_pair()
,
fg_off()
,
fg_on()
,
make_bg()
,
make_fg()
,
make_style()
,
reset()
,
style()
# NOT RUN {
cat("hello world!\n")
attr_on("bf", "ul")
cat("hello world!\n")
attr_off()
# }
Run the code above in your browser using DataLab