v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::String::Value Class Reference

#include <v8-primitive.h>

Collaboration diagram for v8::String::Value:

Public Member Functions

 V8_DEPRECATE_SOON ("Prefer using String::ValueView if you can, or string->Write to a " "buffer if you cannot.") Value(Isolate *isolate
 
 ~Value ()
 
uint16_t * operator* ()
 
const uint16_t * operator* () const
 
uint32_t length () const
 
 Value (const Value &)=delete
 
void operator= (const Value &)=delete
 

Public Attributes

Local< v8::Valueobj
 

Private Attributes

uint16_t * str_
 
uint32_t length_
 

Detailed Description

Converts an object to a two-byte (UTF-16-encoded) string.

If conversion to a string fails (eg. due to an exception in the toString() method of the object) then the length() method returns 0 and the * operator returns NULL.

WARNING: This will unconditionally copy the contents of the JavaScript string, and should be avoided in situations where performance is a concern.

Definition at line 676 of file v8-primitive.h.

Constructor & Destructor Documentation

◆ ~Value()

v8::String::Value::~Value ( )

Definition at line 11068 of file api.cc.

Here is the call graph for this function:

◆ Value()

v8::String::Value::Value ( const Value & )
delete

Definition at line 11052 of file api.cc.

Here is the call graph for this function:

Member Function Documentation

◆ length()

uint32_t v8::String::Value::length ( ) const
inline

Definition at line 685 of file v8-primitive.h.

◆ operator*() [1/2]

uint16_t * v8::String::Value::operator* ( )
inline

Definition at line 683 of file v8-primitive.h.

◆ operator*() [2/2]

const uint16_t * v8::String::Value::operator* ( ) const
inline

Definition at line 684 of file v8-primitive.h.

◆ operator=()

void v8::String::Value::operator= ( const Value & )
delete

◆ V8_DEPRECATE_SOON()

v8::String::Value::V8_DEPRECATE_SOON ( "Prefer using String::ValueView if you can,
or string->Write to a " "buffer if you cannot."  )

Member Data Documentation

◆ length_

uint32_t v8::String::Value::length_
private

Definition at line 693 of file v8-primitive.h.

◆ obj

Local<v8::Value> v8::String::Value::obj

Definition at line 681 of file v8-primitive.h.

◆ str_

uint16_t* v8::String::Value::str_
private

Definition at line 692 of file v8-primitive.h.


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