R/check-scalar-isString.R
check-scalar-isString.Rd
Does the input contain a (non-empty) character string?
isString(x, nullOK = FALSE, .xname = getNameInParent(x))
x | Object. |
---|---|
nullOK |
|
.xname | Name of object defined in |
TRUE
on success;
FALSE
on failure, with cause set.
Updated 2019-08-10.
## TRUE ==== isString("hello")#> [1] TRUE## FALSE ==== isString(1)#> [1] FALSE #> Cause: '1' is not character.isString("")#> [1] FALSE #> Cause: '""' contains empty string.isString(NA_character_)#> [1] FALSE #> Cause: 'NA_character_' is NA.