Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fxcrt::ByteString Class Reference

#include <bytestring.h>

Inheritance diagram for fxcrt::ByteString:
Collaboration diagram for fxcrt::ByteString:

Public Member Functions

 ByteString ()=default
 ByteString (const ByteString &other)=default
 ByteString (ByteString &&other) noexcept=default
 ~ByteString ()=default
UNSAFE_BUFFER_USAGE ByteString (const char *pStr, size_t len)
UNSAFE_BUFFER_USAGE ByteString (const uint8_t *pStr, size_t len)
 ByteString (char ch)
 ByteString (const char *ptr)
 ByteString (wchar_t)=delete
 ByteString (ByteStringView bstrc)
 ByteString (ByteStringView str1, ByteStringView str2)
 ByteString (const std::initializer_list< ByteStringView > &list)
 ByteString (const fxcrt::ostringstream &outStream)
int Compare (ByteStringView str) const
bool EqualNoCase (ByteStringView str) const
bool operator== (const char *ptr) const
bool operator== (ByteStringView str) const
bool operator== (const ByteString &other) const
bool operator!= (const char *ptr) const
bool operator!= (ByteStringView str) const
bool operator!= (const ByteString &other) const
bool operator< (const char *ptr) const
bool operator< (ByteStringView str) const
bool operator< (const ByteString &other) const
ByteStringoperator= (const char *str)
ByteStringoperator= (ByteStringView str)
ByteStringoperator= (const ByteString &that)
ByteStringoperator= (ByteString &&that) noexcept
ByteStringoperator+= (char ch)
ByteStringoperator+= (const char *str)
ByteStringoperator+= (const ByteString &str)
ByteStringoperator+= (ByteStringView str)
ByteString Substr (size_t offset) const
ByteString Substr (size_t first, size_t count) const
ByteString First (size_t count) const
ByteString Last (size_t count) const
void MakeLower ()
void MakeUpper ()
void TrimWhitespace ()
void TrimWhitespaceBack ()
void TrimWhitespaceFront ()
uint32_t GetID () const
Public Member Functions inherited from fxcrt::StringTemplate< char >
bool IsEmpty () const
size_t GetLength () const
size_t GetStringLength () const
const UnsignedTypeunsigned_str () const
StringView AsStringView () const
const CharTypec_str () const
pdfium::span< const CharTypespan () const
pdfium::span< const UnsignedTypeunsigned_span () const
pdfium::span< const CharTypespan_with_terminator () const
pdfium::span< const UnsignedTypeunsigned_span_with_terminator () const
const_iterator begin () const
const_iterator end () const
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const
bool IsValidIndex (size_t index) const
bool IsValidLength (size_t length) const
CharType operator[] (const size_t index) const
CharType Front () const
CharType Back () const
void clear ()
pdfium::span< char > GetBuffer (size_t nMinBufLength)
void ReleaseBuffer (size_t nNewLength)
size_t Insert (size_t index, char ch)
size_t InsertAtFront (char ch)
size_t InsertAtBack (char ch)
size_t Remove (char ch)
size_t Delete (size_t index, size_t count=1)
std::optional< size_t > Find (StringView str, size_t start=0) const
std::optional< size_t > ReverseFind (char ch) const
bool Contains (StringView str, size_t start=0) const
size_t Replace (StringView oldstr, StringView newstr)
void SetAt (size_t index, char ch)
void Reserve (size_t len)
void Trim (char ch)
void TrimFront (char ch)
void TrimBack (char ch)

Static Public Member Functions

static ByteString FormatInteger (int i)
static ByteString Format (const char *pFormat,...)
static ByteString FormatV (const char *pFormat, va_list argList)

Protected Member Functions

intptr_t ReferenceCountForTesting () const
Protected Member Functions inherited from fxcrt::StringTemplate< char >
 StringTemplate ()=default
 ~StringTemplate ()=default
void ReallocBeforeWrite (size_t nNewLen)
void AllocBeforeWrite (size_t nNewLen)
void AssignCopy (const char *pSrcData, size_t nSrcLen)
void Concat (const char *pSrcData, size_t nSrcLen)

Friends

class ByteString_Assign_Test
class ByteString_Concat_Test
class ByteString_Construct_Test
class StringPool_ByteString_Test

Additional Inherited Members

Public Types inherited from fxcrt::StringTemplate< char >
using CharType
using UnsignedType
using StringView
using const_iterator
using const_reverse_iterator
Protected Types inherited from fxcrt::StringTemplate< char >
using StringData
Protected Attributes inherited from fxcrt::StringTemplate< char >
RetainPtr< StringDatam_pData

Detailed Description

Definition at line 25 of file bytestring.h.

Constructor & Destructor Documentation

◆ ByteString() [1/12]

◆ ByteString() [2/12]

fxcrt::ByteString::ByteString ( const ByteString & other)
default

Referenced by CPDF_DocPageData::AddStandardFont(), CPDF_Dictionary::GetByteStringFor(), CPDF_SyntaxParser::ReadString(), fxcrt::TEST(), fxcrt::TEST(), fxcrt::TEST(), and fxcrt::TEST().

Here is the caller graph for this function:

◆ ByteString() [3/12]

fxcrt::ByteString::ByteString ( ByteString && other)
defaultnoexcept

◆ ~ByteString()

fxcrt::ByteString::~ByteString ( )
default

◆ ByteString() [4/12]

fxcrt::ByteString::ByteString ( const char * pStr,
size_t len )

Definition at line 88 of file bytestring.cpp.

◆ ByteString() [5/12]

fxcrt::ByteString::ByteString ( const uint8_t * pStr,
size_t len )

Definition at line 95 of file bytestring.cpp.

◆ ByteString() [6/12]

fxcrt::ByteString::ByteString ( char ch)
explicit

Definition at line 98 of file bytestring.cpp.

Referenced by TEST().

Here is the caller graph for this function:

◆ ByteString() [7/12]

◆ ByteString() [8/12]

fxcrt::ByteString::ByteString ( wchar_t )
delete

◆ ByteString() [9/12]

fxcrt::ByteString::ByteString ( ByteStringView bstrc)
explicit

Definition at line 106 of file bytestring.cpp.

◆ ByteString() [10/12]

fxcrt::ByteString::ByteString ( ByteStringView str1,
ByteStringView str2 )

Definition at line 112 of file bytestring.cpp.

◆ ByteString() [11/12]

fxcrt::ByteString::ByteString ( const std::initializer_list< ByteStringView > & list)

Definition at line 125 of file bytestring.cpp.

◆ ByteString() [12/12]

fxcrt::ByteString::ByteString ( const fxcrt::ostringstream & outStream)
explicit

Definition at line 143 of file bytestring.cpp.

Member Function Documentation

◆ Compare()

int fxcrt::ByteString::Compare ( ByteStringView str) const

Definition at line 346 of file bytestring.cpp.

Referenced by CFXJSE_FormCalcContext::less_operator(), operator<(), fxcrt::operator<(), fxcrt::operator<(), and CFXJSE_FormCalcContext::Within().

Here is the caller graph for this function:

◆ EqualNoCase()

bool fxcrt::ByteString::EqualNoCase ( ByteStringView str) const

Definition at line 281 of file bytestring.cpp.

Referenced by CFXJSE_FormCalcContext::Decode(), CFXJSE_FormCalcContext::Encode(), FPDFDoc_GetPageMode(), and fxcrt::TEST().

Here is the caller graph for this function:

◆ First()

ByteString fxcrt::ByteString::First ( size_t count) const

Definition at line 321 of file bytestring.cpp.

◆ Format()

ByteString fxcrt::ByteString::Format ( const char * pFormat,
... )
staticnodiscard

Definition at line 79 of file bytestring.cpp.

References FormatV().

Referenced by CFGAS_GEColor::ColorToString(), CFXJSE_FormCalcContext::Date(), CPDFXFA_DocEnvironment::ExportData(), FPDF_CreateNewDocument(), FPDFAttachment_SetFile(), FPDFPage_Flatten(), CXFA_FontMgr::GetFont(), CFXJSE_FormCalcContext::Local2IsoDate(), CFXJSE_FormCalcContext::Num2AllTime(), CFXJSE_FormCalcContext::Num2Date(), CFXJSE_FormCalcContext::Str(), fxcrt::TEST(), fxcrt::TEST(), fxcrt::TEST(), and CFXJSE_FormCalcContext::WordNum().

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

◆ FormatInteger()

ByteString fxcrt::ByteString::FormatInteger ( int i)
staticnodiscard

Definition at line 45 of file bytestring.cpp.

References ByteString().

Referenced by CFXJSE_FormCalcContext::Str(), and fxcrt::TEST().

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

◆ FormatV()

ByteString fxcrt::ByteString::FormatV ( const char * pFormat,
va_list argList )
staticnodiscard

Definition at line 52 of file bytestring.cpp.

References ByteString().

Referenced by Format().

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

◆ GetID()

uint32_t fxcrt::ByteString::GetID ( ) const
inline

Definition at line 98 of file bytestring.h.

◆ Last()

ByteString fxcrt::ByteString::Last ( size_t count) const

Definition at line 325 of file bytestring.cpp.

◆ MakeLower()

void fxcrt::ByteString::MakeLower ( )

Definition at line 330 of file bytestring.cpp.

Referenced by CFX_Font::IsItalic(), CFX_FolderFontInfo::ScanPath(), fxcrt::TEST(), CFXJSE_FormCalcContext::UnitType(), and CFXJSE_FormCalcContext::UnitValue().

Here is the caller graph for this function:

◆ MakeUpper()

void fxcrt::ByteString::MakeUpper ( )

Definition at line 338 of file bytestring.cpp.

Referenced by fxcrt::TEST().

Here is the caller graph for this function:

◆ operator!=() [1/3]

bool fxcrt::ByteString::operator!= ( ByteStringView str) const
inline

Definition at line 66 of file bytestring.h.

◆ operator!=() [2/3]

bool fxcrt::ByteString::operator!= ( const ByteString & other) const
inline

Definition at line 67 of file bytestring.h.

References operator==().

Referenced by CFX_FontMapper::FindSubstFont(), and fxcrt::TEST().

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

◆ operator!=() [3/3]

bool fxcrt::ByteString::operator!= ( const char * ptr) const
inline

Definition at line 65 of file bytestring.h.

References operator==().

Referenced by CheckForUnsupportedAnnot(), CPDF_DIB::ContinueLoadDIBBase(), CFX_Font::GetBaseFontName(), CPDF_SyntaxParser::GetIndirectObject(), fxcrt::operator!=(), CFX_FolderFontInfo::ReportFace(), CFX_FolderFontInfo::ScanPath(), and fxcrt::TEST().

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

◆ operator+=() [1/4]

ByteString & fxcrt::ByteString::operator+= ( ByteStringView str)

Definition at line 201 of file bytestring.cpp.

◆ operator+=() [2/4]

ByteString & fxcrt::ByteString::operator+= ( char ch)

Definition at line 189 of file bytestring.cpp.

Referenced by CPDF_CMap::AppendChar(), CPDF_Font::AppendChar(), CBC_OnedCode39Writer::Encode(), CBC_OnedCode39Writer::encodedContents(), PDF_EncodeString(), PDF_HexEncodeString(), CBC_EANCode::Preprocess(), CPDF_SyntaxParser::ReadString(), and CFXJSE_FormCalcContext::Str().

Here is the caller graph for this function:

◆ operator+=() [3/4]

ByteString & fxcrt::ByteString::operator+= ( const ByteString & str)

Definition at line 194 of file bytestring.cpp.

Referenced by CPWL_EditImpl::DrawEdit(), CFX_Font::GetBaseFontName(), CFX_FolderFontInfo::ReportFace(), CFX_FolderFontInfo::ScanPath(), CPDFSDK_AppStream::SetAsCheckBox(), CPDFSDK_AppStream::SetAsRadioButton(), and CFXJSE_FormCalcContext::Str().

Here is the caller graph for this function:

◆ operator+=() [4/4]

ByteString & fxcrt::ByteString::operator+= ( const char * str)

Definition at line 182 of file bytestring.cpp.

Referenced by CWin32Platform::CreateDefaultSystemFontInfo(), CGdiplusExt::Load(), PDF_EncodeString(), CFX_FolderFontInfo::ScanPath(), CFXJSE_FormCalcContext::Str(), fxcrt::TEST(), fxcrt::TEST(), and fxcrt::TEST().

Here is the caller graph for this function:

◆ operator<() [1/3]

bool fxcrt::ByteString::operator< ( ByteStringView str) const

Definition at line 264 of file bytestring.cpp.

References Compare().

Here is the call graph for this function:

◆ operator<() [2/3]

bool fxcrt::ByteString::operator< ( const ByteString & other) const

Definition at line 268 of file bytestring.cpp.

Referenced by fxcrt::TEST().

Here is the caller graph for this function:

◆ operator<() [3/3]

bool fxcrt::ByteString::operator< ( const char * ptr) const

Definition at line 249 of file bytestring.cpp.

Referenced by fxcrt::TEST().

Here is the caller graph for this function:

◆ operator=() [1/4]

ByteString & fxcrt::ByteString::operator= ( ByteString && that)
noexcept

◆ operator=() [2/4]

ByteString & fxcrt::ByteString::operator= ( ByteStringView str)

Definition at line 159 of file bytestring.cpp.

◆ operator=() [3/4]

ByteString & fxcrt::ByteString::operator= ( const ByteString & that)

Definition at line 168 of file bytestring.cpp.

Referenced by CFX_FontMapper::FindSubstFont(), fxcrt::TEST(), fxcrt::TEST(), and CFXJSE_FormCalcContext::UnitValue().

Here is the caller graph for this function:

◆ operator=() [4/4]

ByteString & fxcrt::ByteString::operator= ( const char * str)

Definition at line 150 of file bytestring.cpp.

Referenced by CFX_PSRenderer::DrawDIBits(), CFX_FontMapper::FindSubstFont(), CPDF_FormControl::GetCheckedAPState(), CPDF_FormControl::GetExportValue(), FX_PosixFolder::GetNextFile(), CFX_Font::GetPsName(), CPDF_SimpleFont::LoadPDFEncoding(), PDF_DataDecode(), fxcrt::TEST(), and fxcrt::TEST().

Here is the caller graph for this function:

◆ operator==() [1/3]

bool fxcrt::ByteString::operator== ( ByteStringView str) const

Definition at line 222 of file bytestring.cpp.

◆ operator==() [2/3]

bool fxcrt::ByteString::operator== ( const ByteString & other) const

Definition at line 234 of file bytestring.cpp.

Referenced by CPDF_FormControl::CheckControl(), CPDF_FormField::CheckControl(), PDFObjectsTest::Equal(), CPDF_FormControl::IsChecked(), CPDF_FormControl::IsDefaultChecked(), operator!=(), and fxcrt::TEST().

Here is the caller graph for this function:

◆ operator==() [3/3]

◆ ReferenceCountForTesting()

intptr_t fxcrt::ByteString::ReferenceCountForTesting ( ) const
protected

Definition at line 302 of file bytestring.cpp.

Referenced by fxcrt::TEST(), and fxcrt::TEST().

Here is the caller graph for this function:

◆ Substr() [1/2]

ByteString fxcrt::ByteString::Substr ( size_t first,
size_t count ) const

Definition at line 311 of file bytestring.cpp.

References ByteString().

Here is the call graph for this function:

◆ Substr() [2/2]

ByteString fxcrt::ByteString::Substr ( size_t offset) const

Definition at line 306 of file bytestring.cpp.

◆ TrimWhitespace()

void fxcrt::ByteString::TrimWhitespace ( )

Definition at line 364 of file bytestring.cpp.

References TrimWhitespaceBack(), and TrimWhitespaceFront().

Referenced by fxcrt::TEST().

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

◆ TrimWhitespaceBack()

void fxcrt::ByteString::TrimWhitespaceBack ( )

Definition at line 373 of file bytestring.cpp.

Referenced by CFXJSE_FormCalcContext::Rtrim(), fxcrt::TEST(), fxcrt::TEST(), and TrimWhitespace().

Here is the caller graph for this function:

◆ TrimWhitespaceFront()

void fxcrt::ByteString::TrimWhitespaceFront ( )

Definition at line 369 of file bytestring.cpp.

Referenced by CFXJSE_FormCalcContext::HasValue(), CFXJSE_FormCalcContext::Ltrim(), fxcrt::TEST(), fxcrt::TEST(), and TrimWhitespace().

Here is the caller graph for this function:

◆ ByteString_Assign_Test

friend class ByteString_Assign_Test
friend

Definition at line 103 of file bytestring.h.

◆ ByteString_Concat_Test

friend class ByteString_Concat_Test
friend

Definition at line 104 of file bytestring.h.

◆ ByteString_Construct_Test

friend class ByteString_Construct_Test
friend

Definition at line 105 of file bytestring.h.

◆ StringPool_ByteString_Test

friend class StringPool_ByteString_Test
friend

Definition at line 106 of file bytestring.h.


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