Class jac::StringView
ClassList > jac > StringView
A wrapper around QuickJS C-string with automatic memory management.
#include <stringView.h>
Inherits the following classes: std::basic_string_view< char >
Public Functions
Type | Name |
---|---|
StringView (StringView && other) |
|
StringView (const basic_string_view & other) = delete |
|
StringView (const StringView & other) = delete |
|
StringView () = default |
|
StringView (ContextRef ctx, const char * str) Wrap a QuickJS allocated string. The string will be freed when the StringView is freed. |
|
const char * | c_str () const Get the C string. |
string () const |
|
StringView & | operator= (StringView && other) |
StringView & | operator= (const StringView & other) = delete |
~StringView () |
Public Functions Documentation
function StringView [1/5]
function StringView [2/5]
function StringView [3/5]
function StringView [4/5]
function StringView [5/5]
Wrap a QuickJS allocated string. The string will be freed when the StringView is freed.
Note:
The string must be allocated using QuickJS functions - JS_NewString, JS_ToCString, etc.
Parameters:
ctx
context to work instr
string to wrap
function c_str
Get the C string.
Returns:
const char*
function string
function operator=
function operator=
function ~StringView
The documentation for this class was generated from the following file src/jac/machine/stringView.h