u2c: Convert utf8 hex to character

Description Usage Arguments Examples

View source: R/fileConvert.R

Description

Wrapper for rawToChar to place utf8 symbols in text

Usage

1
u2c(x)

Arguments

x

hex or character vector of utf8 character codes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Character codes can be found at https://www.utf8-chartable.de/
plusminus <- "0xb1"
tilde <- "0x7e"
# Codes don't have to be quoted
atsign <- 0x40
degreeSymbol <- 0xb0
asterisk <- 0x2a
u2c(plusminus)
# Vector
u2c(c(0x48, 0x65, 0x6c, 0x6c, 0x6f))

HJAllen/gfuns documentation built on July 24, 2021, 8:47 a.m.