stringi (version 1.8.3)

stri_isempty: Determine if a String is of Length Zero

Description

This is the fastest way to find out whether the elements of a character vector are empty strings.

Usage

stri_isempty(str)

Value

Returns a logical vector of the same length as str.

Arguments

str

character vector or an object coercible to

Author

Marek Gagolewski and other contributors

Details

Missing values are handled properly.

See Also

The official online manual of stringi at https://stringi.gagolewski.com/

Gagolewski M., stringi: Fast and portable character string processing in R, Journal of Statistical Software 103(2), 2022, 1-59, tools:::Rd_expr_doi("10.18637/jss.v103.i02")

Other length: %s$%(), stri_length(), stri_numbytes(), stri_pad_both(), stri_sprintf(), stri_width()

Examples

Run this code
stri_isempty(letters[1:3])
stri_isempty(c(',', '', 'abc', '123', '\u0105\u0104'))
stri_isempty(character(1))

Run the code above in your browser using DataCamp Workspace