Creates an absl::string_view from a pointer p even if it's null-valued.
Declared in <absl/strings/string_view.h>
constexpr
std::string_view
NullSafeStringView(char const* p);
This function should be used where an absl::string_view can be created from a possibly-null pointer.
A view of p, or an empty view if p is null.
| Name | Description |
|---|---|
| p | The possibly-null pointer to create a view from. |