v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Utf8 Class Reference

#include <unicode.h>

Static Public Member Functions

static uchar Length (uchar chr, int previous)
 
static unsigned Encode (char *out, uchar c, int previous)
 
static const byteReadBlock (Buffer< const char * > str, byte *buffer, unsigned capacity, unsigned *chars_read, unsigned *offset)
 
static uchar CalculateValue (const byte *str, unsigned length, unsigned *cursor)
 

Static Public Attributes

static const uchar kBadChar = 0xFFFD
 
static const unsigned kMaxEncodedSize = 4
 
static const unsigned kMaxOneByteChar = 0x7f
 
static const unsigned kMaxTwoByteChar = 0x7ff
 
static const unsigned kMaxThreeByteChar = 0xffff
 
static const unsigned kMaxFourByteChar = 0x1fffff
 
static const unsigned kBytesSavedByCombiningSurrogates = 2
 
static const unsigned kSizeOfUnmatchedSurrogate = 3
 

Friends

template<unsigned s>
class Utf8InputBuffer
 
class Test
 

Detailed Description

Definition at line 152 of file unicode.h.

Member Function Documentation

uchar CalculateValue ( const byte str,
unsigned  length,
unsigned *  cursor 
)
static
const byte * ReadBlock ( Buffer< const char * >  str,
byte buffer,
unsigned  capacity,
unsigned *  chars_read,
unsigned *  offset 
)
static

Friends And Related Function Documentation

friend class Test
friend

Definition at line 176 of file unicode.h.

friend class Utf8InputBuffer
friend

Definition at line 175 of file unicode.h.

Field Documentation

const uchar kBadChar = 0xFFFD
static

Definition at line 162 of file unicode.h.

Referenced by Utf8::CalculateValue().

const unsigned kBytesSavedByCombiningSurrogates = 2
static

Definition at line 171 of file unicode.h.

Referenced by Utf8::Length(), and v8::internal::Utf8LengthHelper().

const unsigned kMaxEncodedSize = 4
static

Definition at line 163 of file unicode.h.

Referenced by String::WriteUtf8().

const unsigned kMaxFourByteChar = 0x1fffff
static

Definition at line 167 of file unicode.h.

Referenced by Utf8::CalculateValue().

const unsigned kMaxThreeByteChar = 0xffff
static

Definition at line 166 of file unicode.h.

Referenced by Utf8::CalculateValue(), Utf8::Encode(), Utf8::Length(), and TEST().

const unsigned kMaxTwoByteChar = 0x7ff
static

Definition at line 165 of file unicode.h.

Referenced by Utf8::CalculateValue(), Utf8::Encode(), Utf8::Length(), and TEST().

const unsigned kSizeOfUnmatchedSurrogate = 3
static

Definition at line 172 of file unicode.h.

Referenced by Utf8::Encode(), and Utf8::Length().


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