5#ifndef PDFTRON_H_CPPCommonUString
6#define PDFTRON_H_CPPCommonUString
10#include <C/Common/TRN_Types.h>
11#include <C/Common/TRN_UString.h>
393#include <Impl/UString.inl>
int Compare(const UString &str, int max_length=-1) const
friend bool operator==(const UString &rStr1, const UString &rStr2)
UString & Assign(const UString &uni)
int ConvertToUtf8(char *in_out_buf, int buf_sz, bool null_term) const
UString(const char *buf, int buf_sz=-1, TextEncoding enc=e_utf8)
UString(const UString &str)
friend bool operator!=(const UString &rStr1, const UString &rStr2)
const Unicode * GetBuffer() const
void Resize(int count, Unicode ch=' ')
UString & Assign2(const char *buf, int buf_sz=-1, TextEncoding enc=e_utf8)
Unicode GetAt(int idx) const
std::string ConvertToAscii() const
std::string ConvertToUtf8() const
UString & operator=(const UString &str)
UString(const std::wstring &value)
UString & operator+=(const UString &str)
UString(const std::string &str, TextEncoding enc=e_utf8)
UString Concat(const UString &str) const
UString & operator=(const char *ascii_str)
std::wstring ConvertToNativeWString() const
int ConvertToAscii(char *in_out_buf, int buf_sz, bool null_term) const
UString(const Unicode *value, int length)
const Unicode * CStr() const
friend bool operator>(const UString &rStr1, const UString &rStr2)
int ConvertToPDFText(char *in_out_buf, int buf_sz, bool force_unicode=false) const
UString & Assign(const Unicode *uni, int buf_sz=-1)
friend bool operator>=(const UString &rStr1, const UString &rStr2)
UString SubStr(int off=0, int count=-1) const
void PushBack(Unicode ch)
std::basic_string< UInt32 > ConvertToUtf32() const
@ e_winansii_enc
WinAnsiiEncoding. See Appendix 'D' in PDF Reference.
@ e_pdfdoc_enc
PDFDocEncoding. See Appendix 'D' in PDF Reference.
@ e_pdftext_enc
Text represented as PDF Text (section 3.8.1 'Text Strings' in PDF Reference).
@ e_no_enc
No specific encoding.
@ e_utf16be_enc
UTF-16BE (big-endian) encoding scheme.
@ e_utf8
UTF-8 encoding scheme.
@ e_ascii_enc
ASCII encoded text.
friend UString operator+(const UString &str1, const UString &str2)
friend bool operator<(const UString &rStr1, const UString &rStr2)
UString(const Unicode *value)
int ConvertToUtf32(UInt32 *in_out_buf, int buf_sz, bool null_term) const
friend bool operator<=(const UString &rStr1, const UString &rStr2)
std::ostream & operator<<(std::ostream &stream, const UString &str)