V8 Project
|
Converts an object to a UTF-8-encoded character array. More...
#include <v8.h>
Public Member Functions | |
Utf8Value (Handle< v8::Value > obj) | |
~Utf8Value () | |
char * | operator* () |
const char * | operator* () const |
int | length () const |
Private Member Functions | |
Utf8Value (const Utf8Value &) | |
void | operator= (const Utf8Value &) |
Private Attributes | |
char * | str_ |
int | length_ |
Converts an object to a UTF-8-encoded character array.
Useful if you want to print the object. If conversion to a string fails (e.g. due to an exception in the toString() method of the object) then the length() method returns 0 and the * operator returns NULL.
Definition at line 6841 of file api.cc.
References ENTER_V8, v8::Handle< T >::IsEmpty(), length_, v8::Utils::OpenHandle(), str_, v8::Value::ToString(), and v8::Utf8Length().
v8::String::Utf8Value::~Utf8Value | ( | ) |
Definition at line 6857 of file api.cc.
References v8::internal::DeleteArray().
|
private |
|
inline |
Definition at line 2054 of file v8.h.
Referenced by v8::Shell::ExecuteString(), v8::HandleDebugEvent(), v8::ExecArgs::Init(), v8::internal::BreakIterator::InitializeBreakIterator(), v8::internal::Collator::InitializeCollator(), v8::internal::DateFormat::InitializeDateTimeFormat(), v8::internal::NumberFormat::InitializeNumberFormat(), v8::Shell::ReportException(), and v8::Shell::Write().
|
inline |
|
inline |
|
private |
|
private |
Definition at line 2057 of file v8.h.
Referenced by Utf8Value().
|
private |
Definition at line 2056 of file v8.h.
Referenced by Utf8Value().