libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
introvirt::windows::Utf16String Class Referenceabstract

Base UTF-16 class. More...

#include <Utf16String.hh>

Inheritance diagram for introvirt::windows::Utf16String:

Public Member Functions

virtual uint16_t Length () const =0
 
virtual const uint8_t * Buffer () const =0
 
const std::string & utf8 () const
 
const std::u16string & utf16 () const
 
void set (const std::string &value)
 Sets the value of the string.
 
virtual void set (const std::u16string &value)=0
 Sets the value of the string.
 
 operator const std::u16string & () const
 
bool operator== (const std::string &) const
 
bool operator== (const std::u16string &) const
 
bool operator< (const std::string &) const
 
bool operator< (const std::u16string &) const
 
bool equals (const std::string &) const
 
bool equals (const std::u16string &) const
 
bool iequals (const std::string &) const
 
bool iequals (const std::u16string &) const
 
bool starts_with (const std::string &) const
 
bool starts_with (const std::u16string &) const
 
bool istarts_with (const std::string &) const
 
bool istarts_with (const std::u16string &) const
 
bool ends_with (const std::string &) const
 
bool ends_with (const std::u16string &) const
 
bool iends_with (const std::string &) const
 
bool iends_with (const std::u16string &) const
 
 Utf16String ()
 
virtual ~Utf16String ()
 
void write (std::ostream &os, const std::string &linePrefix="") const
 
virtual Json::Value json () const
 
 Utf16String (Utf16String &&) noexcept
 
Utf16Stringoperator= (Utf16String &&) noexcept
 

Static Public Member Functions

static std::string convert (std::u16string_view src)
 Convert a UTF16 string to UTF8.
 
static std::u16string convert (std::string_view src)
 Convert a UTF8 string to UTF16.
 

Static Public Attributes

static const size_t npos
 

Protected Member Functions

void invalidate ()
 

Detailed Description

Base UTF-16 class.

This is used by both WStr and UNICODE_STRING

Constructor & Destructor Documentation

◆ Utf16String() [1/2]

introvirt::windows::Utf16String::Utf16String ( )

◆ ~Utf16String()

virtual introvirt::windows::Utf16String::~Utf16String ( )
virtual

◆ Utf16String() [2/2]

introvirt::windows::Utf16String::Utf16String ( Utf16String &&  )
noexcept

Member Function Documentation

◆ Buffer()

virtual const uint8_t * introvirt::windows::Utf16String::Buffer ( ) const
pure virtual
Returns
The raw UTF16LE buffer

Implemented in introvirt::windows::WStr.

◆ convert() [1/2]

static std::u16string introvirt::windows::Utf16String::convert ( std::string_view  src)
static

Convert a UTF8 string to UTF16.

Parameters
srcThe input string to convert

◆ convert() [2/2]

static std::string introvirt::windows::Utf16String::convert ( std::u16string_view  src)
static

Convert a UTF16 string to UTF8.

Parameters
srcThe input string to convert

◆ ends_with() [1/2]

bool introvirt::windows::Utf16String::ends_with ( const std::string &  ) const
Returns
True if the string ends with the given search string.

◆ ends_with() [2/2]

bool introvirt::windows::Utf16String::ends_with ( const std::u16string &  ) const

◆ equals() [1/2]

bool introvirt::windows::Utf16String::equals ( const std::string &  ) const
Returns
True if this string equals the given string

◆ equals() [2/2]

bool introvirt::windows::Utf16String::equals ( const std::u16string &  ) const

◆ iends_with() [1/2]

bool introvirt::windows::Utf16String::iends_with ( const std::string &  ) const
Returns
True if the string ends with the given search string. Case insensitive.

◆ iends_with() [2/2]

bool introvirt::windows::Utf16String::iends_with ( const std::u16string &  ) const

◆ iequals() [1/2]

bool introvirt::windows::Utf16String::iequals ( const std::string &  ) const
Returns
True if this string equals the given string, case insensitive.

◆ iequals() [2/2]

bool introvirt::windows::Utf16String::iequals ( const std::u16string &  ) const

◆ invalidate()

void introvirt::windows::Utf16String::invalidate ( )
protected

Flush cached UTF8

◆ istarts_with() [1/2]

bool introvirt::windows::Utf16String::istarts_with ( const std::string &  ) const
Returns
True if this string starts with the given search string. Case insensitive.

◆ istarts_with() [2/2]

bool introvirt::windows::Utf16String::istarts_with ( const std::u16string &  ) const

◆ json()

virtual Json::Value introvirt::windows::Utf16String::json ( ) const
virtual

◆ Length()

virtual uint16_t introvirt::windows::Utf16String::Length ( ) const
pure virtual
Returns
The length of the string, in bytes

Implemented in introvirt::windows::WStr, and introvirt::windows::nt::UNICODE_STRING.

◆ operator const std::u16string &()

introvirt::windows::Utf16String::operator const std::u16string & ( ) const

Operator overload for converting to const std::u16string&

◆ operator<() [1/2]

bool introvirt::windows::Utf16String::operator< ( const std::string &  ) const

Comparison operator. The comparison is case sensitive.

◆ operator<() [2/2]

bool introvirt::windows::Utf16String::operator< ( const std::u16string &  ) const

◆ operator=()

Utf16String & introvirt::windows::Utf16String::operator= ( Utf16String &&  )
noexcept

◆ operator==() [1/2]

bool introvirt::windows::Utf16String::operator== ( const std::string &  ) const

Comparison operator. The comparison is case sensitive.

◆ operator==() [2/2]

bool introvirt::windows::Utf16String::operator== ( const std::u16string &  ) const

◆ set() [1/2]

void introvirt::windows::Utf16String::set ( const std::string &  value)

Sets the value of the string.

Parameters
valueThe string to set
Exceptions
BufferTooSmallExceptionif the buffer is too small for the input string

◆ set() [2/2]

virtual void introvirt::windows::Utf16String::set ( const std::u16string &  value)
pure virtual

Sets the value of the string.

Parameters
valueThe string to set
Exceptions
BufferTooSmallExceptionif the buffer is too small for the input string

Implemented in introvirt::windows::WStr, and introvirt::windows::WStr.

◆ starts_with() [1/2]

bool introvirt::windows::Utf16String::starts_with ( const std::string &  ) const
Returns
True if this string starts with the given search string.

◆ starts_with() [2/2]

bool introvirt::windows::Utf16String::starts_with ( const std::u16string &  ) const

◆ utf16()

const std::u16string & introvirt::windows::Utf16String::utf16 ( ) const
Returns
The buffer as a u16string

◆ utf8()

const std::string & introvirt::windows::Utf16String::utf8 ( ) const
Returns
The buffer converted to a UTF8 string

◆ write()

void introvirt::windows::Utf16String::write ( std::ostream &  os,
const std::string &  linePrefix = "" 
) const

Member Data Documentation

◆ npos

const size_t introvirt::windows::Utf16String::npos
static

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