R/is.empty.R
is.empty.character.Rd
This function checks if a character string has zero characters.
# S3 method for character is.empty(x)
A character string
A logical value: TRUE if the string is empty, FALSE otherwise
str1 <- "" is.empty(str1) # Returns TRUE #> [1] TRUE str2 <- "Hello" is.empty(str2) # Returns FALSE #> [1] FALSE