v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8-string-conversions.cc File Reference
#include "src/inspector/v8-string-conversions.h"
#include <limits>
#include <vector>
#include "src/base/logging.h"
Include dependency graph for v8-string-conversions.cc:

Go to the source code of this file.

Namespaces

namespace  v8_inspector
 

Macros

#define U_IS_BMP(c)
 
#define U_IS_SUPPLEMENTARY(c)
 
#define U_IS_SURROGATE(c)
 
#define U16_LEAD(supplementary)
 
#define U16_TRAIL(supplementary)
 

Functions

std::string v8_inspector::UTF16ToUTF8 (const UChar *stringStart, size_t length)
 
std::basic_string< UCharv8_inspector::UTF8ToUTF16 (const char *stringStart, size_t length)
 

Macro Definition Documentation

◆ U16_LEAD

#define U16_LEAD ( supplementary)
Value:
(UChar)(((supplementary) >> 10) + 0xD7C0)

Get the lead surrogate (0xD800..0xDBFF) for a supplementary code point (0x010000..0x10FFFF).

Parameters
supplementary32-bit code point (U+010000..U+10FFFF)
Returns
lead surrogate (U+D800..U+DBFF) for supplementary @stable ICU 2.4

Definition at line 164 of file v8-string-conversions.cc.

◆ U16_TRAIL

#define U16_TRAIL ( supplementary)
Value:
(UChar)(((supplementary)&0x3FF) | 0xDC00)

Get the trail surrogate (0xDC00..0xDFFF) for a supplementary code point (0x010000..0x10FFFF).

Parameters
supplementary32-bit code point (U+010000..U+10FFFF)
Returns
trail surrogate (U+DC00..U+DFFF) for supplementary @stable ICU 2.4

Definition at line 173 of file v8-string-conversions.cc.

◆ U_IS_BMP

#define U_IS_BMP ( c)
Value:
((uint32_t)(c) <= 0xFFFF)

Is this code point a BMP code point (U+0000..U+ffff)?

Parameters
c32-bit code point
Returns
TRUE or FALSE @stable ICU 2.8

Definition at line 139 of file v8-string-conversions.cc.

◆ U_IS_SUPPLEMENTARY

#define U_IS_SUPPLEMENTARY ( c)
Value:
((uint32_t)((c)-0x010000) <= 0xFFFFF)

Is this code point a supplementary code point (U+010000..U+10FFFF)?

Parameters
c32-bit code point
Returns
TRUE or FALSE @stable ICU 2.8

Definition at line 147 of file v8-string-conversions.cc.

◆ U_IS_SURROGATE

#define U_IS_SURROGATE ( c)
Value:
(((c)&0xFFFFF800) == 0xD800)

Is this code point a surrogate (U+d800..U+dfff)?

Parameters
c32-bit code point
Returns
TRUE or FALSE @stable ICU 2.4

Definition at line 155 of file v8-string-conversions.cc.