Return true if this string reference is empty.

Synopsis

Declared in <bslstl_stringref.h>

bool
empty() const;

Description

Return true if this object represents an empty string value, and false otherwise. This object represents an empty string value if begin() == end(). Note that this method is functionally identical with the isEmpty method and allows developers to avoid distracting syntax differences when StringRef appears in juxtaposition with string, which defines empty but not isEmpty.

Return Value

true if empty, and false otherwise

Created with MrDocs