v8  3.25.30(node0.11.13)
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 EncodeOneByte (char *out, uint8_t c)
 
static unsigned Encode (char *out, uchar c, int previous, bool replace_invalid=false)
 
static uchar CalculateValue (const byte *str, unsigned length, unsigned *cursor)
 
static uchar ValueOf (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
 
static const unsigned kMax16BitCodeUnitSize = 3
 

Detailed Description

Definition at line 148 of file unicode.h.

Member Function Documentation

uchar CalculateValue ( const byte str,
unsigned  length,
unsigned *  cursor 
)
static
unsigned EncodeOneByte ( char *  out,
uint8_t  c 
)
inlinestatic

Definition at line 99 of file unicode-inl.h.

References Utf8::kMaxOneByteChar.

uchar ValueOf ( const byte str,
unsigned  length,
unsigned *  cursor 
)
inlinestatic

Field Documentation

const uchar kBadChar = 0xFFFD
static

Definition at line 162 of file unicode.h.

Referenced by Utf8::CalculateValue(), Utf8::Encode(), and Utf8::ValueOf().

const unsigned kBytesSavedByCombiningSurrogates = 2
static
const unsigned kMax16BitCodeUnitSize = 3
static

Definition at line 175 of file unicode.h.

Referenced by String::WriteUtf8().

const unsigned kMaxEncodedSize = 4
static

Definition at line 163 of file unicode.h.

Referenced by String::IsUtf8EqualTo(), and Utf8DecoderBase::WriteUtf16Slow().

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: