stri_isempty: Determine if a String is Empty

Description Usage Arguments Details Value See Also Examples

Description

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

Usage

1

Arguments

str

character vector

Details

Missing values are handled properly, as opposed to the built-in nzchar function.

Value

Returns a logical vector of the same length as str.

See Also

Other length: stri_length; stri_numbytes

Examples

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

Example output


stringi documentation built on May 2, 2019, 4:54 p.m.