anyMultibyteUTF8Characters: Check If a String Contains Multibyte UTF-8 characters

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/deviceUtils.R

Description

This function is used by tikzDevice to check if an incoming string contains multibyte UTF-8 characters

Usage

1
anyMultibyteUTF8Characters(string, encoding = "UTF-8")

Arguments

string

A character vector of length 1 (a string).

encoding

The input encoding of string, if not specified previously via Encoding or by this argument then a value of "UTF-8" is assumed

Details

This function searches through the characters in the given string, if any of the characters in the string are more than one byte then the function returns TRUE otherwise it returns FALSE.

The function will assume an input encoding of UTF-8 but will take any specified encoding into account and will convert from the specified encoding to UTF-8 before doing any checks

Value

A boolean value

Author(s)

Cameron Bracken cameron.bracken@gmail.com

See Also

tikz

Examples

1
2
3
4
# TRUE
anyMultibyteUTF8Characters('R is GNU ©, but not ®')
# FALSE
anyMultibyteUTF8Characters('R is GNU copyright but not restricted')

tikzDevice documentation built on May 19, 2017, 9:02 p.m.

Search within the tikzDevice package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.