Get Special Characters and Their Byte Codes
Source:R/special-characters.R
get_special_character_info.Rd
Get Special Characters and Their Byte Codes
Arguments
- text
vector of character of length one
- context_length
number of characters left and right of special character to be put into column
context
- bytes_per_char
number of bytes per character
Value
data frame with columns special
(special characters) and
bytes
(hexadecimanl byte codes as a space separated string),
context
(strings "around" the special characters)
Examples
(text <- kwb.fakin:::example_string_with_specials("de"))
#> [1] "Schöne Grüße"
get_special_character_info(text)
#> special bytes context
#> 1 \xc3 c3 Sch [ ö ] ne Grü
#> 2 \xb6 b6 öne Gr [ ü ] ße
#> 3 \xc3 c3 ne Grü [ ß ] e
#> 4 \xbc bc Sch [ ö ] ne Grü
#> 5 \xc3 c3 öne Gr [ ü ] ße
#> 6 \x9f 9f ne Grü [ ß ] e