Skip to contents

Does the input contain a (non-empty) character string?

Usage

isString(x, nullOk = FALSE)

Arguments

x

Object.

nullOk

logical(1). If set to TRUE, x may also be NULL.

Value

TRUE on success; FALSE on failure, with cause set.

Note

Updated 2022-12-14.

Examples

## TRUE ====
isString("hello")
#> [1] TRUE

## FALSE ====
isString(1)
#> [1] FALSE
isString("")
#> [1] FALSE
isString(NA_character_)
#> [1] FALSE