glibmm 2.66.5
|
Helper class to avoid unnecessary string copying in function calls. More...
#include <glibmm/ustring.h>
Public Member Functions | |
StdStringView (const std::string & s) | |
StdStringView (const char * s) | |
const char * | c_str () const |
Helper class to avoid unnecessary string copying in function calls.
A Glib::StdStringView holds a const char pointer. It can be used as an argument type in a function that passes a const char pointer to a C function.
Unlike std::string_view, Glib::StdStringView shall be used only for null-terminated strings.
The strings are not copied when f1() is called with string literals.
To pass a Glib::ustring to a function taking a Glib::StdStringView, you may have to use Glib::ustring::c_str().
|
inline |
|
inline |
|
inline |