Inviwo 0.9.12-pre
Inviwo documentation
|
Safe and efficient conversion of a string_view to a null terminated c-string Uses a internal char buffer of size N to store a null terminated copy of the string_view if string_view is larger than N a char[] will be heap allocated. Note: string_view.data() is not null terminated and can not be passed to functions that expect a c-string. More...
#include <safecstr.h>
Public Member Functions | |
SafeCStr (const std::string_view sv) | |
const char * | c_str () const |
operator const char * () const | |
Safe and efficient conversion of a string_view to a null terminated c-string Uses a internal char buffer of size N to store a null terminated copy of the string_view if string_view is larger than N a char[] will be heap allocated. Note: string_view.data() is not null terminated and can not be passed to functions that expect a c-string.