str_rtl: Wrap a string with RTL-embedding Unicode characters

View source: R/str_rtl.R

str_rtlR Documentation

Wrap a string with RTL-embedding Unicode characters

Description

Wrap a string with RTL-embedding Unicode characters

Usage

str_rtl(..., multiline = FALSE)

Arguments

...

One or more character vectors, ideally of length 1.

multiline

Whether to split the input strings to separate lines. Defaults to FALSE.

Value

A character vector.

Examples

# Notice how the `.` prints to the right, while in RTL it should print to the left
cat("a.")

# `str_rtl()` fixes this:
str_rtl("a.") |> cat()

str_rtl("a.", "b.", multiline = TRUE) |> cat()

rtlr documentation built on April 4, 2023, 5:15 p.m.