v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8_inspector::String16 Class Reference

#include <string-16.h>

Collaboration diagram for v8_inspector::String16:

Public Member Functions

 String16 ()=default
 
 String16 (const String16 &) V8_NOEXCEPT=default
 
 String16 (String16 &&) V8_NOEXCEPT=default
 
 String16 (const UChar *characters, size_t size)
 
 String16 (const uint16_t *characters, size_t size)
 
V8_EXPORT String16 (const UChar *characters)
 
V8_EXPORT String16 (const char *characters)
 
 String16 (const char *characters, size_t size)
 
 String16 (std::string_view string)
 
 String16 (const std::basic_string< UChar > &impl)
 
 String16 (std::basic_string< UChar > &&impl)
 
String16operator= (const String16 &) V8_NOEXCEPT=default
 
String16operator= (String16 &&) V8_NOEXCEPT=default
 
int64_t toInteger64 (bool *ok=nullptr) const
 
uint64_t toUInt64 (bool *ok=nullptr) const
 
int toInteger (bool *ok=nullptr) const
 
std::pair< size_t, size_t > getTrimmedOffsetAndLength () const
 
String16 stripWhiteSpace () const
 
const uint16_t * characters16 () const
 
size_t length () const
 
bool isEmpty () const
 
UChar operator[] (size_t index) const
 
String16 substring (size_t pos, size_t len=UINT_MAX) const
 
size_t find (const String16 &str, size_t start=0) const
 
size_t reverseFind (const String16 &str, size_t start=UINT_MAX) const
 
size_t find (UChar c, size_t start=0) const
 
size_t reverseFind (UChar c, size_t start=UINT_MAX) const
 
void swap (String16 &other)
 
V8_EXPORT std::string utf8 () const
 
std::size_t hash () const
 
bool operator== (const String16 &other) const
 
bool operator< (const String16 &other) const
 
bool operator!= (const String16 &other) const
 
String16 operator+ (const String16 &other) const
 
String16operator+= (const String16 &other)
 

Static Public Member Functions

static String16 fromInteger (int)
 
static String16 fromInteger (size_t)
 
static String16 fromInteger64 (int64_t)
 
static String16 fromUInt64 (uint64_t)
 
static String16 fromDouble (double)
 
static String16 fromDouble (double, int precision)
 
static V8_EXPORT String16 fromUTF8 (const char *stringStart, size_t length)
 
static V8_EXPORT String16 fromUTF16LE (const UChar *stringStart, size_t length)
 
static V8_EXPORT String16 fromUTF16LE (const uint16_t *stringStart, size_t length)
 
template<typename... T>
static String16 concat (T... args)
 

Static Public Attributes

static const size_t kNotFound = static_cast<size_t>(-1)
 

Private Attributes

std::basic_string< UCharm_impl
 
std::size_t hash_code = 0
 

Detailed Description

Definition at line 24 of file string-16.h.

Constructor & Destructor Documentation

◆ String16() [1/11]

v8_inspector::String16::String16 ( )
default
Here is the caller graph for this function:

◆ String16() [2/11]

v8_inspector::String16::String16 ( const String16 & )
default

◆ String16() [3/11]

v8_inspector::String16::String16 ( String16 && )
default

◆ String16() [4/11]

v8_inspector::String16::String16 ( const UChar * characters,
size_t size )

Definition at line 51 of file string-16.cc.

◆ String16() [5/11]

v8_inspector::String16::String16 ( const uint16_t * characters,
size_t size )

Definition at line 53 of file string-16.cc.

◆ String16() [6/11]

v8_inspector::String16::String16 ( const UChar * characters)

Definition at line 56 of file string-16.cc.

◆ String16() [7/11]

v8_inspector::String16::String16 ( const char * characters)

Definition at line 58 of file string-16.cc.

◆ String16() [8/11]

v8_inspector::String16::String16 ( const char * characters,
size_t size )

Definition at line 61 of file string-16.cc.

◆ String16() [9/11]

v8_inspector::String16::String16 ( std::string_view string)

Definition at line 63 of file string-16.cc.

◆ String16() [10/11]

v8_inspector::String16::String16 ( const std::basic_string< UChar > & impl)
explicit

Definition at line 66 of file string-16.cc.

◆ String16() [11/11]

v8_inspector::String16::String16 ( std::basic_string< UChar > && impl)
explicit

Definition at line 68 of file string-16.cc.

Member Function Documentation

◆ characters16()

const uint16_t * v8_inspector::String16::characters16 ( ) const
inline

Definition at line 55 of file string-16.h.

Here is the caller graph for this function:

◆ concat()

template<typename... T>
String16 v8_inspector::String16::concat ( T... args)
static

Definition at line 158 of file string-16.h.

Here is the call graph for this function:

◆ find() [1/2]

size_t v8_inspector::String16::find ( const String16 & str,
size_t start = 0 ) const
inline

Definition at line 64 of file string-16.h.

Here is the caller graph for this function:

◆ find() [2/2]

size_t v8_inspector::String16::find ( UChar c,
size_t start = 0 ) const
inline

Definition at line 70 of file string-16.h.

◆ fromDouble() [1/2]

String16 v8_inspector::String16::fromDouble ( double number)
static

Definition at line 98 of file string-16.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromDouble() [2/2]

String16 v8_inspector::String16::fromDouble ( double number,
int precision )
static

Definition at line 106 of file string-16.cc.

Here is the call graph for this function:

◆ fromInteger() [1/2]

String16 v8_inspector::String16::fromInteger ( int number)
static

Definition at line 71 of file string-16.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromInteger() [2/2]

String16 v8_inspector::String16::fromInteger ( size_t number)
static

Definition at line 79 of file string-16.cc.

Here is the call graph for this function:

◆ fromInteger64()

String16 v8_inspector::String16::fromInteger64 ( int64_t number)
static

Definition at line 91 of file string-16.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromUInt64()

static String16 v8_inspector::String16::fromUInt64 ( uint64_t )
static

◆ fromUTF16LE() [1/2]

String16 v8_inspector::String16::fromUTF16LE ( const UChar * stringStart,
size_t length )
static

Definition at line 233 of file string-16.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromUTF16LE() [2/2]

String16 v8_inspector::String16::fromUTF16LE ( const uint16_t * stringStart,
size_t length )
static

Definition at line 250 of file string-16.cc.

Here is the call graph for this function:

◆ fromUTF8()

String16 v8_inspector::String16::fromUTF8 ( const char * stringStart,
size_t length )
static

Definition at line 229 of file string-16.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTrimmedOffsetAndLength()

std::pair< size_t, size_t > v8_inspector::String16::getTrimmedOffsetAndLength ( ) const

Definition at line 127 of file string-16.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hash()

std::size_t v8_inspector::String16::hash ( ) const
inline

Definition at line 90 of file string-16.h.

◆ isEmpty()

bool v8_inspector::String16::isEmpty ( ) const
inline

Definition at line 59 of file string-16.h.

Here is the caller graph for this function:

◆ length()

size_t v8_inspector::String16::length ( ) const
inline

Definition at line 58 of file string-16.h.

Here is the caller graph for this function:

◆ operator!=()

bool v8_inspector::String16::operator!= ( const String16 & other) const
inline

Definition at line 106 of file string-16.h.

◆ operator+()

String16 v8_inspector::String16::operator+ ( const String16 & other) const
inline

Definition at line 109 of file string-16.h.

Here is the call graph for this function:

◆ operator+=()

String16 & v8_inspector::String16::operator+= ( const String16 & other)
inline

Definition at line 112 of file string-16.h.

◆ operator<()

bool v8_inspector::String16::operator< ( const String16 & other) const
inline

Definition at line 103 of file string-16.h.

◆ operator=() [1/2]

String16 & v8_inspector::String16::operator= ( const String16 & )
default

◆ operator=() [2/2]

String16 & v8_inspector::String16::operator= ( String16 && )
default

◆ operator==()

bool v8_inspector::String16::operator== ( const String16 & other) const
inline

Definition at line 100 of file string-16.h.

◆ operator[]()

UChar v8_inspector::String16::operator[] ( size_t index) const
inline

Definition at line 60 of file string-16.h.

◆ reverseFind() [1/2]

size_t v8_inspector::String16::reverseFind ( const String16 & str,
size_t start = UINT_MAX ) const
inline

Definition at line 67 of file string-16.h.

◆ reverseFind() [2/2]

size_t v8_inspector::String16::reverseFind ( UChar c,
size_t start = UINT_MAX ) const
inline

Definition at line 71 of file string-16.h.

◆ stripWhiteSpace()

String16 v8_inspector::String16::stripWhiteSpace ( ) const

Definition at line 145 of file string-16.cc.

Here is the call graph for this function:

◆ substring()

String16 v8_inspector::String16::substring ( size_t pos,
size_t len = UINT_MAX ) const
inline

Definition at line 61 of file string-16.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ swap()

void v8_inspector::String16::swap ( String16 & other)
inline

Definition at line 74 of file string-16.h.

◆ toInteger()

int v8_inspector::String16::toInteger ( bool * ok = nullptr) const

Definition at line 118 of file string-16.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toInteger64()

int64_t v8_inspector::String16::toInteger64 ( bool * ok = nullptr) const

Definition at line 114 of file string-16.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toUInt64()

uint64_t v8_inspector::String16::toUInt64 ( bool * ok = nullptr) const

◆ utf8()

std::string v8_inspector::String16::utf8 ( ) const

Definition at line 254 of file string-16.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ hash_code

std::size_t v8_inspector::String16::hash_code = 0
mutableprivate

Definition at line 123 of file string-16.h.

◆ kNotFound

const size_t v8_inspector::String16::kNotFound = static_cast<size_t>(-1)
static

Definition at line 26 of file string-16.h.

◆ m_impl

std::basic_string<UChar> v8_inspector::String16::m_impl
private

Definition at line 122 of file string-16.h.


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