#include <v8.h>
v8::Primitiveを継承しています。
構成 | |
class | AsciiValue |
class | ExternalAsciiStringResource |
class | ExternalStringResource |
class | Utf8Value |
class | Value |
Public メソッド | |
int | Length () |
int | Utf8Length () |
int | Write (uint16_t *buffer, int start=0, int length=-1) |
int | WriteAscii (char *buffer, int start=0, int length=-1) |
int | WriteUtf8 (char *buffer, int length=-1) |
bool | IsExternal () |
bool | IsExternalAscii () |
ExternalStringResource * | GetExternalStringResource () |
ExternalAsciiStringResource * | GetExternalAsciiStringResource () |
Static Public メソッド | |
static String * | Cast (v8::Value *obj) |
static Local< String > | New (const char *data, int length=-1) |
static Local< String > | New (const uint16_t *data, int length=-1) |
static Local< String > | NewSymbol (const char *data, int length=-1) |
static Local< String > | NewExternal (ExternalStringResource *resource) |
static Local< String > | NewExternal (ExternalAsciiStringResource *resource) |
static Local< String > | NewUndetectable (const char *data, int length=-1) |
static Local< String > | NewUndetectable (const uint16_t *data, int length=-1) |
A JavaScript string value (ECMA-262, 4.3.17).
v8::String * v8::String::Cast | ( | v8::Value * | obj | ) | [static] |
v8::String::ExternalAsciiStringResource * v8::String::GetExternalAsciiStringResource | ( | ) |
Get the ExternalAsciiStringResource for an external ascii string. Only valid if IsExternalAscii() returns true.
参照先 ASSERT, v8::EnsureInitialized(), と v8::Utils::OpenHandle().
v8::String::ExternalStringResource * v8::String::GetExternalStringResource | ( | ) |
Get the ExternalStringResource for an external string. Only valid if IsExternal() returns true.
参照先 ASSERT, v8::EnsureInitialized(), と v8::Utils::OpenHandle().
bool v8::String::IsExternal | ( | ) |
Returns true if the string is external
v8::Valueを再定義しています。
bool v8::String::IsExternalAscii | ( | ) |
Returns true if the string is both external and ascii
int v8::String::Length | ( | ) |
Returns the number of characters in this string.
Allocates a new string from either utf-8 encoded or ascii data. The second parameter 'length' gives the buffer length. If the data is utf-8 encoded, the caller must be careful to supply the length parameter. If it is not given, the function calls 'strlen' to determine the buffer length, it might be wrong if 'data' contains a null character.
参照先 v8::EnsureInitialized(), LOG_API, v8::internal::Factory::NewStringFromUtf8(), と v8::Utils::ToLocal().
参照元 v8::ReadLineEditor::CompletionGenerator(), v8::internal::DebugMessageThread::DebugEvent(), v8::Shell::GetCompletions(), v8::Shell::Initialize(), v8::Shell::Load(), v8::Shell::Main(), v8::Shell::ReadFile(), v8::Shell::RunShell(), v8::Template::Set(), v8::internal::DebugMessageThread::SetEventJSONFromEvent(), と v8::Shell::Version().
Allocates a new string from utf16 data.
参照先 v8::EnsureInitialized(), LOG_API, v8::internal::Factory::NewStringFromTwoByte(), v8::Utils::ToLocal(), と v8::TwoByteStringLength().
Local< String > v8::String::NewExternal | ( | ExternalAsciiStringResource * | resource | ) | [static] |
Creates a new external string using the ascii data defined in the given resource. The resource is deleted when the external string is no longer live on V8's heap. The caller of this function should not delete or modify the resource. Neither should the underlying buffer be deallocated or modified except through the destructor of the external string resource.
参照先 v8::internal::GlobalHandles::Create(), v8::String::ExternalAsciiStringResource::data(), v8::EnsureInitialized(), v8::String::ExternalAsciiStringResource::length(), v8::internal::Handle< T >::location(), LOG_API, v8::internal::GlobalHandles::MakeWeak(), v8::NewExternalAsciiStringHandle(), と v8::Utils::ToLocal().
Local< String > v8::String::NewExternal | ( | ExternalStringResource * | resource | ) | [static] |
Creates a new external string using the data defined in the given resource. The resource is deleted when the external string is no longer live on V8's heap. The caller of this function should not delete or modify the resource. Neither should the underlying buffer be deallocated or modified except through the destructor of the external string resource.
参照先 v8::internal::GlobalHandles::Create(), v8::String::ExternalStringResource::data(), v8::EnsureInitialized(), v8::String::ExternalStringResource::length(), v8::internal::Handle< T >::location(), LOG_API, v8::internal::GlobalHandles::MakeWeak(), v8::NewExternalStringHandle(), と v8::Utils::ToLocal().
Creates a symbol. Returns one if it exists already.
参照先 v8::EnsureInitialized(), LOG_API, v8::internal::Factory::LookupSymbol(), と v8::Utils::ToLocal().
Creates an undetectable string from the supplied ascii or utf-8 data.
参照先 v8::EnsureInitialized(), LOG_API, v8::internal::Factory::NewStringFromUtf8(), と v8::Utils::ToLocal().
Creates an undetectable string from the supplied utf-16 data.
参照先 v8::EnsureInitialized(), LOG_API, v8::internal::Factory::NewStringFromTwoByte(), v8::Utils::ToLocal(), と v8::TwoByteStringLength().
int v8::String::Utf8Length | ( | ) |
Returns the number of bytes in the UTF-8 encoded representation of this string.
int v8::String::Write | ( | uint16_t * | buffer, | |
int | start = 0 , |
|||
int | length = -1 | |||
) |
Write the contents of the string to an external buffer. If no arguments are given, expects the buffer to be large enough to hold the entire string and NULL terminator. Copies the contents of the string and the NULL terminator into the buffer.
Copies up to length characters into the output buffer. Only null-terminates if there is enough space in the buffer.
buffer | The buffer into which the string will be copied. | |
start | The starting position within the string at which copying begins. | |
length | The number of bytes to copy from the string. |
参照先 ASSERT, unibrow::CharacterStream::GetNext(), v8::IsDeadCheck(), LOG_API, v8::Utils::OpenHandle(), unibrow::InputBuffer< Reader, Input, kSize >::Reset(), と v8::write_input_buffer.
int v8::String::WriteAscii | ( | char * | buffer, | |
int | start = 0 , |
|||
int | length = -1 | |||
) |
int v8::String::WriteUtf8 | ( | char * | buffer, | |
int | length = -1 | |||
) |