CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoType::TTextBuffer< aMaxLength > Class Template Reference

#include <cartotype_string.h>

Inheritance diagram for CartoType::TTextBuffer< aMaxLength >:

Public Member Functions

 TTextBuffer ()
 TTextBuffer (const char *aText)
const uint16_t * Text () const
- Public Member Functions inherited from CartoType::MString
virtual ~MString ()
template<typename T >
MStringoperator= (const T &aText)
template<typename T >
MStringoperator+= (const T &aText)
size_t Length () const
bool IsEmpty () const
virtual const uint16_t * Text () const =0
void Delete (size_t aStart, size_t aEnd)
void Clear ()
void SetLengthToZero ()
std::basic_string< uint16_t > CreateUtf16String () const
std::string CreateUtf8String () const
 operator std::string () const
uint16_t operator[] (size_t aIndex) const
TText First (size_t aLength) const
TText Last (size_t aLength) const
void DeletePrefix (const MString &aPrefix)
void DeleteSuffix (const MString &aSuffix)
void SetCase (TLetterCase aCase, const CStringTypeDictionary *aTitleCaseDictionary=0)
void SetSentenceCase ()
int32_t Compare (MIter< int32_t > &aIter, TStringMatchMethod aStringMatchMethod) const noexcept
TResult Replace (size_t aStart, size_t aEnd, MIter< int32_t > &aText, size_t aMaxLength)
int32_t Compare (const MString &aString) const
int32_t Compare (const MString &aString, TStringMatchMethod aStringMatchMethod) const noexcept
size_t Find (const MString &aString, TStringMatchMethod aStringMatchMethod=TStringMatchMethod::Exact, size_t *aEndPos=nullptr) const noexcept
void Replace (size_t aStart, size_t aEnd, const MString &aString)
void Insert (size_t aIndex, const MString &aString)
void Append (const MString &aString)
void AppendCommaSeparated (const CString &aLabel, const CString &aText, size_t &aItems, size_t aMaxItems=SIZE_MAX)
void Set (const MString &aString)
int32_t Compare (const uint16_t *aText) const
int32_t Compare (const uint16_t *aText, size_t aLength) const
int32_t Compare (const char16_t *aText, size_t aLength=npos) const
int32_t Compare (const uint16_t *aText, size_t aLength, TStringMatchMethod aStringMatchMethod) const noexcept
void Replace (size_t aStart, size_t aEnd, const uint16_t *aText, size_t aLength=npos)
void Insert (size_t aIndex, const uint16_t *aText, size_t aLength=npos)
void Append (const uint16_t *aText, size_t aLength=npos)
void Set (const uint16_t *aText, size_t aLength=npos)
int32_t Compare (const char *aText, size_t aLength=npos, TStringMatchMethod aStringMatchMethod=TStringMatchMethod::Exact) const noexcept
int32_t CompareExact (const char *aText, size_t aLength=npos) const noexcept
int32_t CompareFoldCase (const char *aText, size_t aLength=npos) const noexcept
void Replace (size_t aStart, size_t aEnd, const char *aText, size_t aLength=npos, int32_t aCodePage=0)
bool operator== (const char *aText) const noexcept
bool operator% (const char *aText) const noexcept
bool operator!= (const char *aText) const
void Insert (size_t aIndex, const char *aText, size_t aLength=npos, int32_t aCodePage=0)
void Append (const char *aText, size_t aLength=npos, int32_t aCodePage=0)
template<typename T >
void Append (const std::basic_string< T > aString)
template<typename T >
void Set (const std::basic_string< T > aString)
void Set (const char *aText, size_t aLength=npos)
void Set (const char *aText, size_t aLength, int32_t aCodePage)
void Replace (size_t aStart, size_t aEnd, uint16_t aChar)
void Insert (size_t aIndex, uint16_t aChar)
void Append (uint16_t aChar)
void Set (uint16_t aChar)
void Trim ()
bool operator== (const MString &aString) const
bool operator== (const uint16_t *aText) const
bool operator== (const char16_t *aText) const
bool operator!= (const MString &aString) const
bool operator!= (const uint16_t *aText) const
bool operator!= (const char16_t *aText) const
bool operator% (const MString &aString) const
bool operator% (const uint16_t *aText) const
bool WildMatch (const MString &aWildText) const noexcept
bool WildMatch (const char *aWildText) const noexcept
bool LayerMatch (const MString &aWildText) const
bool LayerMatch (const char *aWildText) const noexcept
template<class T >
bool operator< (const T &aOther) const
template<class T >
bool operator<= (const T &aOther) const
template<class T >
bool operator> (const T &aOther) const
template<class T >
bool operator>= (const T &aOther) const
int32_t ToInt32 (size_t *aLengthUsed=nullptr, int32_t aBase=10) const noexcept
int64_t ToInt64 (size_t *aLengthUsed=nullptr, int32_t aBase=10) const noexcept
uint32_t ToUint32 (size_t *aLengthUsed=nullptr, int32_t aBase=10) const noexcept
double ToDouble (size_t *aLengthUsed=nullptr) const noexcept
double ToDimension (size_t *aLengthUsed=nullptr) const noexcept
void Shape (TBidiParDir aParDir, CBidiEngine *aBidiEngine, bool aParStart, bool aReorderFontSelectors)
void Abbreviate (const CAbbreviationDictionary &aDictionary)
void Transliterate (const CStringTypeDictionary *aTitleCaseDictionary=nullptr, const char *aLocale=nullptr)
bool IsLineBreak (size_t aPos) const noexcept
size_t LineBreakBefore (size_t aPos) const noexcept
size_t LineBreakAfter (size_t aPos) const noexcept
void SetAttribute (const MString &aKey, const MString &aValue)
void SetAttribute (const CString &aKey, const CString &aValue)
TText GetAttribute (const MString &aKey) const noexcept
TText GetAttribute (const CString &aKey) const noexcept
bool NextAttribute (size_t &aPos, TText &aKey, TText &aValue) const noexcept

Additional Inherited Members

- Static Public Member Functions inherited from CartoType::MString
static int32_t Compare (MIter< int32_t > &aIter1, MIter< int32_t > &aIter2, TStringMatchMethod aStringMatchMethod) noexcept
static bool FuzzyMatch (MIter< int32_t > &aIter1, MIter< int32_t > &aIter2, int32_t aMaxDistance) noexcept
static bool FuzzyMatch (const char *aText1, const char *aText2, int32_t aMaxDistance) noexcept
static int32_t ToInt32 (const uint8_t *aText, size_t aLength, size_t *aLengthUsed=nullptr, int32_t aBase=10) noexcept
- Static Public Attributes inherited from CartoType::MString
static constexpr int KMaxFuzzyDistance = 4
- Protected Member Functions inherited from CartoType::MString
 MString ()
 MString (size_t aLength)
- Protected Attributes inherited from CartoType::MString
size_t iLength

Detailed Description

template<size_t aMaxLength>
class CartoType::TTextBuffer< aMaxLength >

A string that owns its own text, which has a maximum length fixed at compile time.

Constructor & Destructor Documentation

◆ TTextBuffer() [1/2]

template<size_t aMaxLength>
CartoType::TTextBuffer< aMaxLength >::TTextBuffer ( )

Construct an empty TTextBuffer object.

◆ TTextBuffer() [2/2]

template<size_t aMaxLength>
CartoType::TTextBuffer< aMaxLength >::TTextBuffer ( const char *  aText)

Construct a TTextBuffer object from an 8-bit ASCII string.

Member Function Documentation

◆ Text()

template<size_t aMaxLength>
const uint16_t * CartoType::TTextBuffer< aMaxLength >::Text ( ) const

Returns a constant pointer to Unicode text stored in UTF16 format.

Implements CartoType::MString.

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