7#ifndef CORE_FXCRT_WIDESTRING_H_
8#define CORE_FXCRT_WIDESTRING_H_
20#include "core/fxcrt/retain_ptr.h"
21#include "core/fxcrt/string_data_template.h"
22#include "core/fxcrt/string_view_template.h"
23#include "third_party/abseil-cpp/absl/types/optional.h"
24#include "third_party/base/check.h"
25#include "third_party/base/containers/span.h"
36 using CharType =
wchar_t;
37 using const_iterator =
const CharType*;
38 using const_reverse_iterator =
std::reverse_iterator<const_iterator>;
65 WideString(WideStringView str1, WideStringView str2);
66 WideString(
const std::initializer_list<WideStringView>& list);
81 const wchar_t*
c_str()
const {
return m_pData ? m_pData->m_String : L""; }
86 return WideStringView(c_str(), GetLength());
91 pdfium::span<
const wchar_t> span()
const {
92 return pdfium::make_span(m_pData ? m_pData->m_String :
nullptr,
97 const_iterator
begin()
const {
return m_pData ? m_pData->m_String :
nullptr; }
98 const_iterator
end()
const {
99 return m_pData ? m_pData->m_String + m_pData->m_nDataLength :
nullptr;
104 return const_reverse_iterator(
end());
106 const_reverse_iterator
rend()
const {
107 return const_reverse_iterator(
begin());
116 return m_pData ? wcslen(m_pData->m_String) : 0;
134 bool operator==(
const wchar_t* ptr)
const;
135 bool operator==(WideStringView str)
const;
138 bool operator!=(
const wchar_t* ptr)
const {
return !(*
this == ptr); }
139 bool operator!=(WideStringView str)
const {
return !(*
this == str); }
142 bool operator<(
const wchar_t* ptr)
const;
143 bool operator<(WideStringView str)
const;
147 CHECK(IsValidIndex(index));
148 return m_pData->m_String[index];
151 CharType
Front()
const {
return GetLength() ? (*
this)[0] : 0; }
152 CharType
Back()
const {
return GetLength() ? (*
this)[GetLength() - 1] : 0; }
154 void SetAt(size_t index,
wchar_t c);
156 int Compare(
const wchar_t* str)
const;
174 void Trim(
wchar_t target);
175 void Trim(WideStringView targets);
179 void TrimLeft(WideStringView targets);
192 pdfium::span<
wchar_t>
GetBuffer(size_t nMinBufLength);
204 bool Contains(WideStringView lpszSub, size_t start = 0)
const {
205 return Find(lpszSub, start).has_value();
209 return Find(ch, start).has_value();
215 bool IsASCII()
const {
return AsStringView().IsASCII(); }
217 return AsStringView().EqualsASCII(that);
220 return AsStringView().EqualsASCIINoCase(that);
242 void AssignCopy(
const wchar_t* pSrcData, size_t nSrcLen);
243 void Concat(
const wchar_t* pSrcData, size_t nSrcLen);
248 friend class WideString_Assign_Test;
249 friend class WideString_ConcatInPlace_Test;
250 friend class WideString_Construct_Test;
251 friend class StringPool_WideString_Test;
270 return WideString(str1.AsStringView(), str2.AsStringView());
273 return WideString(str1.AsStringView(), WideStringView(ch));
276 return WideString(WideStringView(ch), str2.AsStringView());
308std::wostream& operator<<(
std::wostream& os, WideStringView str);
309std::ostream& operator<<(
std::ostream& os, WideStringView str);
328struct hash<WideString> {
330 return FX_HashCode_GetW(str.AsStringView());
336extern template struct std::hash<WideString>;
uint32_t FX_HashCode_GetLoweredAsIfW(ByteStringView str)
uint32_t FX_HashCode_GetLoweredA(ByteStringView str)
uint32_t FX_HashCode_GetAsIfW(ByteStringView str)
uint32_t FX_HashCode_GetA(ByteStringView str)
CPDF_ArrayLocker(RetainPtr< CPDF_Array > pArray)
const_iterator begin() const
const_iterator end() const
CPDF_ArrayLocker(const CPDF_Array *pArray)
CPDF_ArrayLocker(RetainPtr< const CPDF_Array > pArray)
void Append(RetainPtr< CPDF_Stream > stream)=delete
bool GetBooleanAt(size_t index, bool bDefault) const
void SetAt(size_t index, RetainPtr< CPDF_Object > object)
RetainPtr< CPDF_Dictionary > GetMutableDictAt(size_t index)
RetainPtr< CPDF_Object > CloneNonCyclic(bool bDirect, std::set< const CPDF_Object * > *pVisited) const override
RetainPtr< const CPDF_Object > GetDirectObjectAt(size_t index) const
RetainPtr< const CPDF_Stream > GetStreamAt(size_t index) const
Type GetType() const override
absl::optional< size_t > Find(const CPDF_Object *pThat) const
CPDF_Array * AsMutableArray() override
RetainPtr< const CPDF_Object > GetObjectAt(size_t index) const
RetainPtr< CPDF_Object > GetMutableObjectAt(size_t index)
std::enable_if<!CanInternStrings< T >::value, RetainPtr< T > >::type AppendNew(Args &&... args)
WideString GetUnicodeTextAt(size_t index) const
RetainPtr< CPDF_Array > GetMutableArrayAt(size_t index)
RetainPtr< CPDF_Object > Clone() const override
std::enable_if< CanInternStrings< T >::value, RetainPtr< T > >::type AppendNew(Args &&... args)
RetainPtr< const CPDF_Dictionary > GetDictAt(size_t index) const
std::enable_if<!CanInternStrings< T >::value, RetainPtr< T > >::type InsertNewAt(size_t index, Args &&... args)
RetainPtr< CPDF_Stream > GetMutableStreamAt(size_t index)
bool Contains(const CPDF_Object *pThat) const
void ConvertToIndirectObjectAt(size_t index, CPDF_IndirectObjectHolder *pHolder)
std::enable_if< CanInternStrings< T >::value, RetainPtr< T > >::type InsertNewAt(size_t index, Args &&... args)
std::enable_if<!CanInternStrings< T >::value, RetainPtr< T > >::type SetNewAt(size_t index, Args &&... args)
bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const override
RetainPtr< CPDF_Object > GetMutableDirectObjectAt(size_t index)
CFX_Matrix GetMatrix() const
int GetIntegerAt(size_t index) const
void SetAt(size_t index, RetainPtr< CPDF_Stream > stream)=delete
void InsertAt(size_t index, RetainPtr< CPDF_Object > object)
ByteString GetByteStringAt(size_t index) const
std::enable_if< CanInternStrings< T >::value, RetainPtr< T > >::type SetNewAt(size_t index, Args &&... args)
void Append(RetainPtr< CPDF_Object > object)
RetainPtr< const CPDF_String > GetStringAt(size_t index) const
RetainPtr< const CPDF_Array > GetArrayAt(size_t index) const
RetainPtr< const CPDF_Number > GetNumberAt(size_t index) const
CFX_FloatRect GetRect() const
void InsertAt(size_t index, RetainPtr< CPDF_Stream > stream)=delete
void RemoveAt(size_t index)
float GetFloatAt(size_t index) const
CPDF_Creator(CPDF_Document *pDoc, RetainPtr< IFX_RetainableWriteStream > archive)
bool SetFileVersion(int32_t fileVersion)
bool Create(uint32_t flags)
void DeleteIndirectObject(uint32_t objnum)
RetainPtr< const CPDF_Object > GetIndirectObject(uint32_t objnum) const
std::enable_if<!CanInternStrings< T >::value, RetainPtr< T > >::type New(Args &&... args)
void SetLastObjNum(uint32_t objnum)
const_iterator begin() const
RetainPtr< T > NewIndirect(Args &&... args)
RetainPtr< CPDF_Object > GetOrParseIndirectObject(uint32_t objnum)
uint32_t GetLastObjNum() const
CPDF_IndirectObjectHolder()
WeakPtr< ByteStringPool > GetByteStringPool() const
std::enable_if< CanInternStrings< T >::value, RetainPtr< T > >::type New(Args &&... args)
virtual RetainPtr< CPDF_Object > ParseIndirectObject(uint32_t objnum)
RetainPtr< CPDF_Object > GetMutableIndirectObject(uint32_t objnum)
virtual ~CPDF_IndirectObjectHolder()
uint32_t AddIndirectObject(RetainPtr< CPDF_Object > pObj)
bool ReplaceIndirectObjectIfHigherGeneration(uint32_t objnum, RetainPtr< CPDF_Object > pObj)
const_iterator end() const
void SetGenNum(uint32_t gennum)
RetainPtr< const CPDF_Dictionary > GetDict() const
uint32_t GetGenNum() const
virtual Type GetType() const =0
virtual WideString GetUnicodeText() const
virtual ByteString GetString() const
RetainPtr< const CPDF_Object > GetDirect() const
virtual CPDF_Null * AsMutableNull()
const CPDF_Name * AsName() const
const CPDF_Boolean * AsBoolean() const
virtual void SetString(const ByteString &str)
const CPDF_Null * AsNull() const
bool IsDictionary() const
virtual RetainPtr< CPDF_Reference > MakeReference(CPDF_IndirectObjectHolder *holder) const
RetainPtr< CPDF_Object > GetMutableDirect()
const CPDF_Array * AsArray() const
virtual int GetInteger() const
virtual float GetNumber() const
uint32_t GetObjNum() const
const CPDF_Dictionary * AsDictionary() const
virtual bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const =0
RetainPtr< CPDF_Object > CloneDirectObject() const
virtual CPDF_Stream * AsMutableStream()
virtual CPDF_Number * AsMutableNumber()
virtual CPDF_Dictionary * AsMutableDictionary()
virtual RetainPtr< CPDF_Object > Clone() const =0
virtual CPDF_Reference * AsMutableReference()
CPDF_Object(const CPDF_Object &src)=delete
const CPDF_Stream * AsStream() const
static constexpr uint32_t kInvalidObjNum
virtual const CPDF_Object * GetDirectInternal() const
virtual CPDF_Name * AsMutableName()
void SetObjNum(uint32_t objnum)
const CPDF_String * AsString() const
uint64_t KeyForCache() const
virtual CPDF_Array * AsMutableArray()
const CPDF_Reference * AsReference() const
virtual RetainPtr< CPDF_Object > CloneNonCyclic(bool bDirect, std::set< const CPDF_Object * > *pVisited) const
virtual CPDF_String * AsMutableString()
const CPDF_Number * AsNumber() const
RetainPtr< CPDF_Dictionary > GetMutableDict()
RetainPtr< CPDF_Object > CloneObjectNonCyclic(bool bDirect) const
virtual const CPDF_Dictionary * GetDictInternal() const
virtual CPDF_Boolean * AsMutableBoolean()
virtual FX_FILESIZE CurrentOffset() const =0
static RetainPtr< IFX_SeekableReadStream > CreateFromFilename(const char *filename)
virtual size_t ReadBlock(pdfium::span< uint8_t > buffer)
virtual FX_FILESIZE GetPosition()
virtual bool ReadBlockAtOffset(pdfium::span< uint8_t > buffer, FX_FILESIZE offset)=0
bool WriteBlock(pdfium::span< const uint8_t > buffer) override
virtual bool WriteBlockAtOffset(pdfium::span< const uint8_t > data, FX_FILESIZE offset)=0
bool WriteBlock(pdfium::span< const uint8_t > buffer) override
virtual FX_FILESIZE GetSize()=0
bool WriteFilesize(FX_FILESIZE size)
bool WriteByte(uint8_t byte)
bool WriteString(ByteStringView str)
virtual ~IFX_WriteStream()=default
bool WriteDWord(uint32_t i)
virtual bool WriteBlock(pdfium::span< const uint8_t > data)=0
void TrimLeft(ByteStringView targets)
bool IsValidLength(size_t length) const
bool Contains(ByteStringView lpszSub, size_t start=0) const
const_iterator begin() const
bool IsValidIndex(size_t index) const
static ByteString FormatFloat(float f)
ByteStringView AsStringView() const
ByteString(const char *ptr)
bool EqualNoCase(ByteStringView str) const
static ByteString Format(const char *pFormat,...)
ByteString & operator+=(const ByteString &str)
bool operator!=(ByteStringView str) const
ByteString Substr(size_t first, size_t count) const
size_t GetStringLength() const
size_t InsertAtBack(char ch)
bool operator==(ByteStringView str) const
pdfium::span< const uint8_t > raw_span() const
void AllocCopy(ByteString &dest, size_t nCopyLen, size_t nCopyIndex) const
void AssignCopy(const char *pSrcData, size_t nSrcLen)
bool Contains(char ch, size_t start=0) const
absl::optional< size_t > ReverseFind(char ch) const
intptr_t ReferenceCountForTesting() const
size_t Delete(size_t index, size_t count=1)
const_reverse_iterator rend() const
ByteString & operator+=(char ch)
const uint8_t * raw_str() const
void ReallocBeforeWrite(size_t nNewLen)
ByteString(ByteStringView bstrc)
RetainPtr< StringData > m_pData
static ByteString FormatInteger(int i)
pdfium::span< char > GetBuffer(size_t nMinBufLength)
bool operator==(const ByteString &other) const
bool operator==(const char *ptr) const
const_iterator end() const
ByteString(const ByteString &other)
ByteString(const char *pStr, size_t len)
bool operator<(ByteStringView str) const
ByteString(wchar_t)=delete
ByteString & operator+=(const char *str)
ByteString & operator+=(ByteStringView str)
ByteString(const uint8_t *pStr, size_t len)
size_t Replace(ByteStringView pOld, ByteStringView pNew)
absl::optional< size_t > Find(ByteStringView subStr, size_t start=0) const
bool operator!=(const ByteString &other) const
void SetAt(size_t index, char c)
ByteString & operator=(ByteStringView str)
ByteString(ByteStringView str1, ByteStringView str2)
void Trim(ByteStringView targets)
ByteString & operator=(const char *str)
static ByteString FormatV(const char *pFormat, va_list argList)
void TrimRight(char target)
const char * c_str() const
ByteString Substr(size_t offset) const
ByteString & operator=(const ByteString &that)
ByteString & operator=(ByteString &&that) noexcept
void TrimRight(ByteStringView targets)
bool operator<(const ByteString &other) const
ByteString(const std::initializer_list< ByteStringView > &list)
CharType operator[](const size_t index) const
const_reverse_iterator rbegin() const
bool operator!=(const char *ptr) const
int Compare(ByteStringView str) const
size_t Insert(size_t index, char ch)
void ReleaseBuffer(size_t nNewLength)
ByteString(const fxcrt::ostringstream &outStream)
void TrimLeft(char target)
size_t InsertAtFront(char ch)
ByteString First(size_t count) const
void AllocBeforeWrite(size_t nNewLen)
bool operator<(const char *ptr) const
void Concat(const char *pSrcData, size_t nSrcLen)
absl::optional< size_t > Find(char ch, size_t start=0) const
ByteString(ByteString &&other) noexcept
ByteString Last(size_t count) const
RetainPtr & operator=(const RetainPtr< U > &that)
RetainPtr(std::nullptr_t ptr)
void Reset(T *obj=nullptr)
bool operator!=(const RetainPtr &that) const
void Swap(RetainPtr &that)
RetainPtr() noexcept=default
RetainPtr(RetainPtr &&that) noexcept
bool operator!=(const U &that) const
RetainPtr & operator=(const RetainPtr &that)
bool operator==(const RetainPtr &that) const
bool operator==(const U &that) const
RetainPtr & operator=(RetainPtr &&that) noexcept
RetainPtr & operator=(RetainPtr< U > &&that) noexcept
RetainPtr(const RetainPtr< U > &that)
bool operator<(const RetainPtr &that) const
RetainPtr(const RetainPtr &that) noexcept
operator T*() const noexcept
RetainPtr & operator=(std::nullptr_t) noexcept
UnownedPtr< T > BackPointer() const
RetainPtr(RetainPtr< U > &&that) noexcept
RetainPtr< U > As() const
RetainPtr(T *pObj) noexcept
virtual ~Retainable()=default
void CopyContents(const CharType *pStr, size_t nLen)
static StringDataTemplate * Create(size_t nLen)
const size_t m_nAllocLength
void CopyContents(const StringDataTemplate &other)
bool CanOperateInPlace(size_t nTotalLen) const
static StringDataTemplate * Create(const CharType *pStr, size_t nLen)
void CopyContentsAt(size_t offset, const CharType *pStr, size_t nLen)
absl::optional< size_t > Find(CharType ch) const
bool operator>(const StringViewTemplate &that) const
StringViewTemplate(const CharType *ptr) noexcept
bool operator<(const StringViewTemplate &that) const
constexpr StringViewTemplate(const UnsignedType *ptr, size_t size) noexcept
bool IsValidLength(size_t length) const
UnsignedType Back() const
constexpr StringViewTemplate(const CharType *ptr, size_t size) noexcept
bool operator!=(const CharType *ptr) const
StringViewTemplate TrimmedRight(CharType ch) const
pdfium::span< const UnsignedType > m_Span
bool EqualsASCII(const StringViewTemplate< char > &that) const
const CharType * unterminated_c_str() const
bool operator==(const CharType *ptr) const
bool Contains(CharType ch) const
bool EqualsASCIINoCase(const StringViewTemplate< char > &that) const
pdfium::span< const UnsignedType > raw_span() const
StringViewTemplate Substr(size_t first, size_t count) const
bool operator==(const StringViewTemplate &other) const
const_iterator end() const
const UnsignedType & operator[](const size_t index) const
StringViewTemplate Last(size_t count) const
CharType CharAt(const size_t index) const
bool operator!=(const StringViewTemplate &other) const
StringViewTemplate First(size_t count) const
constexpr StringViewTemplate(const pdfium::span< const CharType > &other) noexcept
constexpr StringViewTemplate(const StringViewTemplate &src) noexcept=default
const_iterator begin() const
StringViewTemplate & operator=(const StringViewTemplate &src)
const_reverse_iterator rend() const
UnsignedType Front() const
StringViewTemplate & operator=(const CharType *src)
StringViewTemplate Substr(size_t offset) const
constexpr StringViewTemplate() noexcept=default
constexpr StringViewTemplate(const CharType &ch) noexcept
const_reverse_iterator rbegin() const
const UnsignedType * raw_str() const
bool IsValidIndex(size_t index) const
constexpr StringViewTemplate(const pdfium::span< const UnsignedType > &other) noexcept
UnownedPtr(const UnownedPtr< U > &that)
bool operator==(const UnownedPtr &that) const
operator T*() const noexcept
UnownedPtr(UnownedPtr< U > &&that) noexcept
UnownedPtr & operator=(UnownedPtr< U > &&that) noexcept
constexpr UnownedPtr(const UnownedPtr &that) noexcept=default
constexpr UnownedPtr(T *pObj) noexcept
UnownedPtr & operator=(T *that) noexcept
bool operator==(std::nullptr_t ptr) const
UnownedPtr & operator=(UnownedPtr &&that) noexcept
UnownedPtr & operator=(std::nullptr_t) noexcept
UnownedPtr & operator=(const UnownedPtr< U > &that) noexcept
constexpr UnownedPtr() noexcept=default
bool operator<(const UnownedPtr &that) const
UnownedPtr & operator=(const UnownedPtr &that) noexcept=default
constexpr UnownedPtr(UnownedPtr &&that) noexcept
constexpr UnownedPtr(std::nullptr_t ptr)
WideString(const std::initializer_list< WideStringView > &list)
WideString & operator+=(const WideString &str)
bool operator==(const WideString &other) const
size_t Insert(size_t index, wchar_t ch)
ByteString ToUTF8() const
static WideString Format(const wchar_t *pFormat,...)
WideString(WideString &&other) noexcept
WideString(const wchar_t *pStr, size_t len)
WideString & operator=(WideString &&that) noexcept
WideString(WideStringView str1, WideStringView str2)
WideString First(size_t count) const
static WideString FromUTF8(ByteStringView str)
WideString & operator+=(const wchar_t *str)
const_reverse_iterator rbegin() const
void Trim(WideStringView targets)
pdfium::span< wchar_t > GetBuffer(size_t nMinBufLength)
bool operator==(const wchar_t *ptr) const
WideString & operator+=(wchar_t ch)
size_t Replace(WideStringView pOld, WideStringView pNew)
void TrimLeft(wchar_t target)
WideStringView AsStringView() const
void TrimLeft(WideStringView targets)
void SetAt(size_t index, wchar_t c)
bool operator<(WideStringView str) const
bool EqualsASCIINoCase(ByteStringView that) const
CharType operator[](const size_t index) const
const wchar_t * c_str() const
void TrimRight(WideStringView targets)
static WideString FromDefANSI(ByteStringView str)
void AssignCopy(const wchar_t *pSrcData, size_t nSrcLen)
WideString(const WideString &other)
int CompareNoCase(const wchar_t *str) const
void AllocCopy(WideString &dest, size_t nCopyLen, size_t nCopyIndex) const
WideString(const wchar_t *ptr)
bool IsValidIndex(size_t index) const
absl::optional< size_t > Find(wchar_t ch, size_t start=0) const
bool Contains(char ch, size_t start=0) const
static size_t WStringLength(const unsigned short *str)
static WideString FromLatin1(ByteStringView str)
size_t InsertAtBack(wchar_t ch)
size_t InsertAtFront(wchar_t ch)
bool operator==(WideStringView str) const
bool operator!=(const WideString &other) const
ByteString ToLatin1() const
intptr_t ReferenceCountForTesting() const
bool Contains(WideStringView lpszSub, size_t start=0) const
static WideString FromUTF16BE(pdfium::span< const uint8_t > data)
bool operator<(const WideString &other) const
int Compare(const wchar_t *str) const
WideString & operator=(const WideString &that)
void TrimRight(wchar_t target)
WideString EncodeEntities() const
void ReallocBeforeWrite(size_t nNewLength)
ByteString ToASCII() const
static WideString FromASCII(ByteStringView str)
WideString & operator+=(WideStringView str)
const_iterator end() const
static WideString FromUTF16LE(pdfium::span< const uint8_t > data)
void ReleaseBuffer(size_t nNewLength)
size_t GetStringLength() const
WideString Last(size_t count) const
int Compare(const WideString &str) const
const_reverse_iterator rend() const
WideString & operator=(const wchar_t *str)
void Concat(const wchar_t *pSrcData, size_t nSrcLen)
WideString Substr(size_t offset) const
const_iterator begin() const
WideString(WideStringView str)
void Trim(wchar_t target)
size_t Remove(wchar_t ch)
absl::optional< size_t > ReverseFind(wchar_t ch) const
bool operator!=(const wchar_t *ptr) const
static WideString FormatV(const wchar_t *lpszFormat, va_list argList)
ByteString ToUTF16LE() const
static WideString FormatInteger(int i)
size_t Delete(size_t index, size_t count=1)
bool EqualsASCII(ByteStringView that) const
ByteString ToDefANSI() const
bool operator<(const wchar_t *ptr) const
void AllocBeforeWrite(size_t nNewLength)
WideString Substr(size_t first, size_t count) const
bool IsValidLength(size_t length) const
absl::optional< size_t > Find(WideStringView subStr, size_t start=0) const
bool operator!=(WideStringView str) const
WideString & operator=(WideStringView str)
RetainPtr< StringData > m_pData
CPDF_Array * ToArray(CPDF_Object *obj)
const CPDF_Array * ToArray(const CPDF_Object *obj)
RetainPtr< CPDF_Array > ToArray(RetainPtr< CPDF_Object > obj)
#define FPDFCREATE_INCREMENTAL
#define FPDFCREATE_NO_ORIGINAL
NOINLINE void FX_OutOfMemoryTerminate(size_t size)
void FXMEM_DefaultFree(void *pointer)
void * FXMEM_DefaultAlloc(size_t byte_size)
void * FXMEM_DefaultCalloc(size_t num_elems, size_t byte_size)
void * FXMEM_DefaultRealloc(void *pointer, size_t new_size)
void * FX_ArrayBufferAllocate(size_t length)
void FX_InitializeMemoryAllocators()
void FX_ArrayBufferFree(void *data)
void * FX_ArrayBufferAllocateUninitialized(size_t length)
void * FX_Random_MT_Start(uint32_t dwSeed)
uint32_t FX_Random_MT_Generate(void *pContext)
void FX_Random_MT_Close(void *pContext)
size_t FloatToString(float f, pdfium::span< char > buf)
constexpr uint32_t FXBSTR_ID(uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4)
double StringToDouble(WideStringView wsStr)
float StringToFloat(ByteStringView str)
ByteString FX_UTF8Encode(WideStringView wsStr)
std::u16string FX_UTF16Encode(WideStringView wsStr)
size_t DoubleToString(double d, pdfium::span< char > buf)
float StringToFloat(WideStringView wsStr)
double StringToDouble(ByteStringView str)
bool operator==(const char *lhs, const ByteString &rhs)
bool operator<(const ByteStringView &lhs, const char *rhs)
WideString operator+(const wchar_t *str1, WideStringView str2)
ByteString operator+(const ByteString &str1, const ByteString &str2)
ByteString operator+(ByteStringView str1, const char *str2)
bool operator<(const ByteStringView &lhs, const ByteString &rhs)
bool operator==(const wchar_t *lhs, const WideString &rhs)
WideString operator+(const WideString &str1, const WideString &str2)
WideString operator+(const WideString &str1, WideStringView str2)
WideString operator+(const WideString &str1, wchar_t ch)
bool operator==(const T *lhs, const StringViewTemplate< T > &rhs)
bool operator<(const T *lhs, const StringViewTemplate< T > &rhs)
ByteString operator+(const ByteString &str1, char ch)
WideString operator+(WideStringView str1, const WideString &str2)
ByteString operator+(const ByteString &str1, const char *str2)
std::vector< StrType > Split(const StrType &that, typename StrType::CharType ch)
void PrintTo(const ByteString &str, std::ostream *os)
bool operator!=(const T *lhs, const StringViewTemplate< T > &rhs)
ByteString operator+(char ch, const ByteString &str2)
ByteString operator+(const ByteString &str1, ByteStringView str2)
ByteString operator+(const char *str1, const ByteString &str2)
bool operator!=(WideStringView lhs, const WideString &rhs)
bool operator!=(ByteStringView lhs, const ByteString &rhs)
bool operator!=(const char *lhs, const ByteString &rhs)
ByteString operator+(ByteStringView str1, ByteStringView str2)
ByteString operator+(ByteStringView str1, char ch)
bool operator<(const char *lhs, const ByteString &rhs)
bool operator==(WideStringView lhs, const WideString &rhs)
bool operator!=(const wchar_t *lhs, const WideString &rhs)
ByteString operator+(char ch, ByteStringView str2)
WideString operator+(WideStringView str1, const wchar_t *str2)
WideString operator+(WideStringView str1, wchar_t ch)
void PrintTo(const WideString &str, std::ostream *os)
ByteString operator+(ByteStringView str1, const ByteString &str2)
WideString operator+(WideStringView str1, WideStringView str2)
WideString operator+(wchar_t ch, WideStringView str2)
ByteString operator+(const char *str1, ByteStringView str2)
WideString operator+(wchar_t ch, const WideString &str2)
WideString operator+(const wchar_t *str1, const WideString &str2)
bool operator<(const wchar_t *lhs, const WideString &rhs)
bool operator==(ByteStringView lhs, const ByteString &rhs)
WideString operator+(const WideString &str1, const wchar_t *str2)
void * CallocOrDie2D(size_t w, size_t h, size_t member_size)
void * AllocOrDie2D(size_t w, size_t h, size_t member_size)
void * StringAllocOrDie(size_t num_members, size_t member_size)
void * Alloc(size_t num_members, size_t member_size)
void * StringAlloc(size_t num_members, size_t member_size)
void * ReallocOrDie(void *ptr, size_t num_members, size_t member_size)
void * Realloc(void *ptr, size_t num_members, size_t member_size)
void StringDealloc(void *ptr)
void * AllocOrDie(size_t num_members, size_t member_size)
void * Calloc(size_t num_members, size_t member_size)
void * CallocOrDie(size_t num_members, size_t member_size)
UnownedPtr< T > WrapUnowned(T *that)
RetainPtr< T > MakeRetain(Args &&... args)
RetainPtr< T > WrapRetain(T *that)
#define CONSTRUCT_VIA_MAKE_RETAIN
static constexpr bool value
void operator()(void *ptr) const
pointer allocate(size_type n, const void *hint=0)
void deallocate(pointer p, size_type n)
const_pointer address(const_reference x) const noexcept
FxPartitionAllocAllocator() noexcept=default
size_type max_size() const noexcept
~FxPartitionAllocAllocator()=default
pointer address(reference x) const noexcept
FxPartitionAllocAllocator(const FxPartitionAllocAllocator< U, Alloc, Free > &other) noexcept
bool operator!=(const FxPartitionAllocAllocator &that)
void construct(U *p, Args &&... args)
bool operator==(const FxPartitionAllocAllocator &that)
FxPartitionAllocAllocator(const FxPartitionAllocAllocator &other) noexcept=default
void operator()(T *ptr) const
size_t operator()(const ByteString &str) const
size_t operator()(const WideString &str) const
#define UNOWNED_PTR_EXCLUSION
uint32_t FX_HashCode_GetLoweredW(WideStringView str)
uint32_t FX_HashCode_GetW(WideStringView str)