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

Synopsis

Declared in <absl/strings/str_split.h>

struct SkipWhitespace;

Description

Example:

std::vector<std::string> v = absl::StrSplit(" a , ,,b,", ',', SkipWhitespace()); // v[0]== " a ", v[1]== "b"

// SkipEmpty() would return whitespace elements std::vector<std::string> v = absl::StrSplit(" a , ,,b,", ',', SkipEmpty()); // v[0]== " a ", v[1]== " ", v[2]== "b"

Member Functions

Name

Description

operator()

Returns true if sp contains a non‐whitespace character.

Created with MrDocs