Skip to contents

This function checks if a character string has zero characters.

Usage

# S3 method for character
is.empty(x)

Arguments

x

A character string

Value

A logical value: TRUE if the string is empty, FALSE otherwise

Examples

str1 <- ""
is.empty(str1)  # Returns TRUE
#> [1] TRUE

str2 <- "Hello"
is.empty(str2)  # Returns FALSE
#> [1] FALSE