構成 | Public メソッド | Static Public メソッド

クラス v8::String

#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 ()
ExternalStringResourceGetExternalStringResource ()
ExternalAsciiStringResourceGetExternalAsciiStringResource ()

Static Public メソッド

static StringCast (v8::Value *obj)
static Local< StringNew (const char *data, int length=-1)
static Local< StringNew (const uint16_t *data, int length=-1)
static Local< StringNewSymbol (const char *data, int length=-1)
static Local< StringNewExternal (ExternalStringResource *resource)
static Local< StringNewExternal (ExternalAsciiStringResource *resource)
static Local< StringNewUndetectable (const char *data, int length=-1)
static Local< StringNewUndetectable (const uint16_t *data, int length=-1)

説明

A JavaScript string value (ECMA-262, 4.3.17).

v8.h722 行で定義されています。


関数

v8::String * v8::String::Cast ( v8::Value obj  )  [static]

api.cc1478 行で定義されています。

参照先 v8::ApiCheck(), v8::IsDeadCheck(), と v8::Utils::OpenHandle().

v8::String::ExternalAsciiStringResource * v8::String::GetExternalAsciiStringResource (  ) 

Get the ExternalAsciiStringResource for an external ascii string. Only valid if IsExternalAscii() returns true.

api.cc2102 行で定義されています。

参照先 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.

api.cc2092 行で定義されています。

参照先 ASSERT, v8::EnsureInitialized(), と v8::Utils::OpenHandle().

bool v8::String::IsExternal (  ) 

Returns true if the string is external

v8::Valueを再定義しています。

api.cc2078 行で定義されています。

参照先 v8::EnsureInitialized(), と v8::Utils::OpenHandle().

bool v8::String::IsExternalAscii (  ) 

Returns true if the string is both external and ascii

api.cc2085 行で定義されています。

参照先 v8::EnsureInitialized(), と v8::Utils::OpenHandle().

int v8::String::Length (  ) 

Returns the number of characters in this string.

api.cc1978 行で定義されています。

参照先 v8::IsDeadCheck(), と v8::Utils::OpenHandle().

Local< String > v8::String::New ( const char *  data,
int  length = -1 
) [static]

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.

api.cc2378 行で定義されています。

参照先 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().

Local< String > v8::String::New ( const uint16_t *  data,
int  length = -1 
) [static]

Allocates a new string from utf16 data.

api.cc2406 行で定義されています。

参照先 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.

api.cc2480 行で定義されています。

参照先 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.

api.cc2465 行で定義されています。

参照先 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().

Local< String > v8::String::NewSymbol ( const char *  data,
int  length = -1 
) [static]

Creates a symbol. Returns one if it exists already.

api.cc2544 行で定義されています。

参照先 v8::EnsureInitialized(), LOG_API, v8::internal::Factory::LookupSymbol(), と v8::Utils::ToLocal().

Local< String > v8::String::NewUndetectable ( const char *  data,
int  length = -1 
) [static]

Creates an undetectable string from the supplied ascii or utf-8 data.

api.cc2388 行で定義されています。

参照先 v8::EnsureInitialized(), LOG_API, v8::internal::Factory::NewStringFromUtf8(), と v8::Utils::ToLocal().

Local< String > v8::String::NewUndetectable ( const uint16_t *  data,
int  length = -1 
) [static]

Creates an undetectable string from the supplied utf-16 data.

api.cc2416 行で定義されています。

参照先 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.

api.cc1984 行で定義されています。

参照先 v8::IsDeadCheck(), と v8::Utils::OpenHandle().

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.
戻り値:
The number of characters copied to the buffer excluding the NULL terminator.

api.cc2056 行で定義されています。

参照先 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 
)

このクラスの説明は次のファイルから生成されました:
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義