Loading...
Searching...
No Matches
Public Member Functions | List of all members
v8::String::ValueView Class Reference

#include <v8-primitive.h>

Public Member Functions

 ValueView (Isolate *isolate, Local< v8::String > str)
 
 ~ValueView ()
 
const uint8_t * data8 () const
 
const uint16_t * data16 () const
 
int length () const
 
bool is_one_byte () const
 
 ValueView (const ValueView &)=delete
 
void operator= (const ValueView &)=delete
 

Detailed Description

Returns a view onto a string's contents.

WARNING: This does not copy the string's contents, and will therefore be invalidated if the GC can move the string while the ValueView is alive. It is therefore required that no GC or allocation can happen while there is an active ValueView. This requirement may be relaxed in the future.

V8 strings are either encoded as one-byte or two-bytes per character.

Constructor & Destructor Documentation

◆ ValueView() [1/2]

v8::String::ValueView::ValueView ( Isolate isolate,
Local< v8::String str 
)

◆ ~ValueView()

v8::String::ValueView::~ValueView ( )

◆ ValueView() [2/2]

v8::String::ValueView::ValueView ( const ValueView )
delete

Member Function Documentation

◆ data16()

const uint16_t * v8::String::ValueView::data16 ( ) const
inline

◆ data8()

const uint8_t * v8::String::ValueView::data8 ( ) const
inline

◆ is_one_byte()

bool v8::String::ValueView::is_one_byte ( ) const
inline

◆ length()

int v8::String::ValueView::length ( ) const
inline

◆ operator=()

void v8::String::ValueView::operator= ( const ValueView )
delete

Member Data Documentation

◆ data16_

const uint16_t* v8::String::ValueView::data16_

◆ data8_

const uint8_t* v8::String::ValueView::data8_

The documentation for this class was generated from the following file: