Returns false if the given absl::string_view is empty, indicating that StrSplit() should omit the empty string.

Synopsis

Declared in <absl/strings/str_split.h>

struct SkipEmpty;

Description

Example:

std::vector<std::string> v = absl::StrSplit(",a,,b,", ',', SkipEmpty());

// v[0]== "a", v[1]== "b"

Note: SkipEmpty() does not consider a string containing only whitespace to be empty. To skip such whitespace as well, use the SkipWhitespace() predicate.

Member Functions

Name

Description

operator()

Returns true if sp is non‐empty.

Created with MrDocs