v8 13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
String::Value Class Reference

#include <v8-primitive.h>

Collaboration diagram for 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
 

Data Fields

Local< v8::Valueobj
 

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()

~Value ( )

References Value().

◆ Value()

Value ( const Value & )
delete

References Value().

Referenced by operator=(), Value(), and ~Value().

Member Function Documentation

◆ length()

uint32_t length ( ) const
inline

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

◆ operator*() [1/2]

uint16_t * operator* ( )
inline

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

◆ operator*() [2/2]

const uint16_t * operator* ( ) const
inline

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

◆ operator=()

void operator= ( const Value & )
delete

References Value().

◆ V8_DEPRECATE_SOON()

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

Field Documentation

◆ obj

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


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