Last chance! 50% off unlimited learning
Sale ends in
transl33t
translates text into leet (or l33t) slang
given a set of rules.
transl33t(txt, rules = l33t_rul35, in_case = "no", out_case = "no")
The text (character string) to translate.
Rules which existing character in txt
is to be replaced by which new character (as a named character vector).
Default: rules = l33t_rul35
.
Change case of input string txt
.
Default: in_case = "no"
.
Set to "lo"
or "up"
for lower or uppercase, respectively.
Change case of output string.
Default: out_case = "no"
.
Set to "lo"
or "up"
for lower or uppercase, respectively.
The current version of transl33t
only uses base R
commands,
rather than the stringr package.
l33t_rul35
for default rules used.
Other text objects and functions:
Umlaut
,
capitalize()
,
caseflip()
,
cclass
,
count_chars()
,
count_words()
,
l33t_rul35
,
metachar
,
read_ascii()
,
text_to_sentences()
,
text_to_words()
# NOT RUN {
# Use defaults:
transl33t(txt = "hello world")
transl33t(txt = c(letters))
transl33t(txt = c(LETTERS))
# Specify rules:
transl33t(txt = "hello world",
rules = c("e" = "3", "l" = "1", "o" = "0"))
# Set input and output case:
transl33t(txt = "hello world", in_case = "up",
rules = c("e" = "3", "l" = "1", "o" = "0")) # e only capitalized
transl33t(txt = "hEllo world", in_case = "lo", out_case = "up",
rules = c("e" = "3", "l" = "1", "o" = "0")) # e transl33ted
# }
Run the code above in your browser using DataLab