unicode_utilities: Other Unicode utilities

Description Usage Arguments Value See Also Examples

Description

ucp2label() returns Unicode code point “labels” as a character vector. ucp_sort() sorts Unicode code points. is_combining_character() returns TRUE if the character is a “combining” character.

Usage

1
2
3
4
5
ucp2label(x)

ucp_sort(x, decreasing = FALSE)

is_combining_character(x, pua_combining = character(0))

Arguments

x

A character vector of Unicode code points.

decreasing

If TRUE do a decreasing sort.

pua_combining

Additional Unicode code points to be considered as a “combining” character such as characters defined in the Private Use Area (PUA) of a font.

Value

ucp2label() returns a character vector of Unicode labels. ucp_sort() returns a character vector of Unicode code points. is_combining_character() returns a logical vector.

See Also

block2ucp(), hex2ucp(), int2ucp(), name2ucp(), range2ucp(), and str2ucp() all return Unicode code points.

Examples

1
2
3
4
5
  # Get the Unicode Code Point "label" for "R"
  ucp2label(str2ucp("R"))

  is_combining_character(str2ucp("a"))
  is_combining_character("U+0300") # COMBINING GRAVE ACCENT

bittermelon documentation built on Nov. 2, 2021, 1:06 a.m.