powered by
Returns TRUE if (is.null(x) || (length(x) == 0) || (max(nchar(x)) == 0)).
TRUE
(is.null(x) || (length(x) == 0) || (max(nchar(x)) == 0))
nchar0(x, ...)
TRUE if x is either
x
NULL or max(nchar(x))
NULL
max(nchar(x))
== 0. FALSE otherwise.
FALSE
a character vector or something that can be coerced to mode character
optional arguments to be passed to nchar
nchar
Spencer Graves
stopifnot( all.equal(nchar0(NULL), TRUE) ) stopifnot( all.equal(nchar0(character(0)), TRUE) ) stopifnot( all.equal(nchar0(character(3)), TRUE) ) stopifnot( all.equal(nchar0(c('a', 'c')), FALSE) )
Run the code above in your browser using DataLab