NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
CStringUTF8_DEPRECATED Class Reference

Search Toolkit Book for CStringUTF8_DEPRECATED

#include <corelib/impl/stringutf8_deprecated.hpp>

+ Inheritance diagram for CStringUTF8_DEPRECATED:
+ Collaboration diagram for CStringUTF8_DEPRECATED:

Classes

class  CNotImplemented
 

Public Types

enum  EValidate { eNoValidate , eValidate }
 How to verify the character encoding of the source data. More...
 
enum  ECharBufferType { eZeroTerminated , eCharBuffer }
 How to interpret zeros in the source character buffer - as end of string, or as part of the data. More...
 

Public Member Functions

 CStringUTF8_DEPRECATED (void)
 
 ~CStringUTF8_DEPRECATED (void)
 
 CStringUTF8_DEPRECATED (const CStringUTF8_DEPRECATED &src, EValidate validate=eNoValidate)
 Copy constructor. More...
 
 CStringUTF8_DEPRECATED (const CTempString src)
 Constructor from a C/C++ string. More...
 
 CStringUTF8_DEPRECATED (const char *src)
 
 CStringUTF8_DEPRECATED (const string &src)
 
 CStringUTF8_DEPRECATED (const CTempString src, EEncoding encoding, EValidate validate=eNoValidate)
 
 CStringUTF8_DEPRECATED (const char *src, EEncoding encoding, EValidate validate=eNoValidate)
 
 CStringUTF8_DEPRECATED (const string &src, EEncoding encoding, EValidate validate=eNoValidate)
 
 CStringUTF8_DEPRECATED (const TStringUnicode &src)
 Constructor from Unicode string. More...
 
 CStringUTF8_DEPRECATED (const TStringUCS2 &src)
 
 CStringUTF8_DEPRECATED (const wstring &src)
 
 CStringUTF8_DEPRECATED (const TUnicodeSymbol *src)
 Constructor from Unicode character sequence. More...
 
 CStringUTF8_DEPRECATED (const TCharUCS2 *src)
 
 CStringUTF8_DEPRECATED (const wchar_t *src)
 
 CStringUTF8_DEPRECATED (ECharBufferType type, const TUnicodeSymbol *src, SIZE_TYPE char_count)
 Constructor from Unicode character sequence. More...
 
 CStringUTF8_DEPRECATED (ECharBufferType type, const TCharUCS2 *src, SIZE_TYPE char_count)
 
 CStringUTF8_DEPRECATED (ECharBufferType type, const wchar_t *src, SIZE_TYPE char_count)
 
CStringUTF8_DEPRECATEDoperator= (const CStringUTF8_DEPRECATED &src)
 Assign UTF8 string. More...
 
CStringUTF8_DEPRECATEDoperator= (const TStringUnicode &src)
 Assign Unicode C++ string. More...
 
CStringUTF8_DEPRECATEDoperator= (const TStringUCS2 &src)
 
CStringUTF8_DEPRECATEDoperator= (const wstring &src)
 
CStringUTF8_DEPRECATEDoperator= (const TUnicodeSymbol *src)
 Assign Unicode C string. More...
 
CStringUTF8_DEPRECATEDoperator= (const TCharUCS2 *src)
 
CStringUTF8_DEPRECATEDoperator= (const wchar_t *src)
 
CStringUTF8_DEPRECATEDoperator+= (const CStringUTF8_DEPRECATED &src)
 Append UTF8 string. More...
 
CStringUTF8_DEPRECATEDoperator+= (const TStringUnicode &src)
 Append Unicode C++ string. More...
 
CStringUTF8_DEPRECATEDoperator+= (const TStringUCS2 &src)
 
CStringUTF8_DEPRECATEDoperator+= (const wstring &src)
 
CStringUTF8_DEPRECATEDoperator+= (const TUnicodeSymbol *src)
 Append Unicode C string. More...
 
CStringUTF8_DEPRECATEDoperator+= (const TCharUCS2 *src)
 
CStringUTF8_DEPRECATEDoperator+= (const wchar_t *src)
 
CStringUTF8_DEPRECATEDAssign (const CTempString src, EEncoding encoding, EValidate validate=eNoValidate)
 Assign C/C++ string. More...
 
CStringUTF8_DEPRECATEDAssign (const TStringUnicode &src)
 Assign Unicode C++ string. More...
 
CStringUTF8_DEPRECATEDAssign (const TStringUCS2 &src)
 
CStringUTF8_DEPRECATEDAssign (const wstring &src)
 
CStringUTF8_DEPRECATEDAssign (const TUnicodeSymbol *src)
 Assign Unicode C string. More...
 
CStringUTF8_DEPRECATEDAssign (const TCharUCS2 *src)
 
CStringUTF8_DEPRECATEDAssign (const wchar_t *src)
 
CStringUTF8_DEPRECATEDAssign (ECharBufferType type, const TUnicodeSymbol *src, SIZE_TYPE char_count)
 Assign Unicode C string or character buffer. More...
 
CStringUTF8_DEPRECATEDAssign (ECharBufferType type, const TCharUCS2 *src, SIZE_TYPE char_count)
 
CStringUTF8_DEPRECATEDAssign (ECharBufferType type, const wchar_t *src, SIZE_TYPE char_count)
 
CStringUTF8_DEPRECATEDAssign (char ch, EEncoding encoding)
 Assign a single character. More...
 
CStringUTF8_DEPRECATEDAppend (const CTempString src, EEncoding encoding, EValidate validate=eNoValidate)
 Append a C/C++ string. More...
 
CStringUTF8_DEPRECATEDAppend (const TStringUnicode &src)
 Append Unicode C++ string. More...
 
CStringUTF8_DEPRECATEDAppend (const TStringUCS2 &src)
 
CStringUTF8_DEPRECATEDAppend (const wstring &src)
 
CStringUTF8_DEPRECATEDAppend (const TUnicodeSymbol *src)
 Append Unicode C string. More...
 
CStringUTF8_DEPRECATEDAppend (const TCharUCS2 *src)
 
CStringUTF8_DEPRECATEDAppend (const wchar_t *src)
 
CStringUTF8_DEPRECATEDAppend (ECharBufferType type, const TUnicodeSymbol *src, SIZE_TYPE char_count)
 Append Unicode C string or character buffer. More...
 
CStringUTF8_DEPRECATEDAppend (ECharBufferType type, const TCharUCS2 *src, SIZE_TYPE char_count)
 
CStringUTF8_DEPRECATEDAppend (ECharBufferType type, const wchar_t *src, SIZE_TYPE char_count)
 
CStringUTF8_DEPRECATEDAppend (char ch, EEncoding encoding)
 Append single character. More...
 
CStringUTF8_DEPRECATEDAppend (TUnicodeSymbol ch)
 Append single Unicode code point. More...
 
SIZE_TYPE GetSymbolCount (void) const
 Get the number of symbols (code points) in the string. More...
 
bool IsValid (void) const
 Get the number of symbols (code points) in the string. More...
 
string AsLatin1 (const char *substitute_on_error=0) const
 Convert to ISO 8859-1 (Latin1) character representation. More...
 
string AsSingleByteString (EEncoding encoding, const char *substitute_on_error=0) const
 Convert the string to a single-byte character representation. More...
 
wstring AsUnicode (const wchar_t *substitute_on_error=0) const
 Convert to Unicode (UCS-2 with no surrogates where sizeof(wchar_t) == 2 and UCS-4 where sizeof(wchar_t) == 4). More...
 
TStringUCS2 AsUCS2 (const TCharUCS2 *substitute_on_error=0) const
 Convert to UCS-2 for all platforms. More...
 
template<typename TChar >
basic_string< TCharAsBasicString (const TChar *substitute_on_error=0) const
 Conversion to Unicode string with any base type we need. More...
 
CStringUTF8_DEPRECATEDTruncateSpacesInPlace (NStr::ETrunc side=NStr::eTrunc_Both)
 Guess the encoding of the C/C++ string. More...
 

Static Public Member Functions

template<typename TChar >
static basic_string< TCharAsBasicString (const CTempString src, const TChar *substitute_on_error, EValidate validate=eNoValidate)
 Conversion to Unicode string with any base type we need. More...
 
template<typename TChar >
static basic_string< TCharAsBasicString (const CTempString src)
 Conversion to Unicode string with any base type we need. More...
 

Private Member Functions

void x_Validate (void) const
 Truncate spaces in the string. More...
 
void x_AppendChar (TUnicodeSymbol ch)
 Convert Unicode code point into UTF8 and append. More...
 
void x_Append (const CTempString src, EEncoding encoding, EValidate validate=eNoValidate)
 Convert coded character sequence into UTF8 and append. More...
 
template<typename TIterator >
void x_Append (TIterator from, TIterator to)
 Convert Unicode character sequence into UTF8 and append Sequence can be in UCS-4 (TChar == (U)Int4), UCS-2 (TChar == (U)Int2) or in ISO8859-1 (TChar == char) More...
 
template<typename TChar >
void x_Append (const TChar *src, SIZE_TYPE to=NPOS, ECharBufferType type=eZeroTerminated)
 

Static Private Member Functions

template<typename TChar >
static basic_string< TCharx_AsBasicString (const CTempString src, const TChar *substitute_on_error, EValidate validate)
 
template<typename TIterator >
static TUnicodeSymbol x_Decode (TIterator &src)
 
static SIZE_TYPE x_BytesNeeded (TUnicodeSymbol ch)
 Check how many bytes is needed to represent the code point in UTF8. More...
 
static bool x_EvalFirst (char ch, SIZE_TYPE &more)
 Check if the character is valid first code unit of UTF8. More...
 
static bool x_EvalNext (char ch)
 Check if the character is valid non-first code unit of UTF8. More...
 

Detailed Description

Examples
/home/coremake/doxygen/cxx/include/corelib/ncbistr.hpp.

Definition at line 67 of file stringutf8_deprecated.hpp.

Member Enumeration Documentation

◆ ECharBufferType

How to interpret zeros in the source character buffer - as end of string, or as part of the data.

Enumerator
eZeroTerminated 

Character buffer is zero-terminated.

eCharBuffer 

Zeros are part of the data.

Definition at line 79 of file stringutf8_deprecated.hpp.

◆ EValidate

How to verify the character encoding of the source data.

Enumerator
eNoValidate 
eValidate 

Definition at line 72 of file stringutf8_deprecated.hpp.

Constructor & Destructor Documentation

◆ CStringUTF8_DEPRECATED() [1/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( void  )
inline

Definition at line 84 of file stringutf8_deprecated.hpp.

◆ ~CStringUTF8_DEPRECATED()

CStringUTF8_DEPRECATED::~CStringUTF8_DEPRECATED ( void  )
inline

Definition at line 87 of file stringutf8_deprecated.hpp.

◆ CStringUTF8_DEPRECATED() [2/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const CStringUTF8_DEPRECATED src,
EValidate  validate = eNoValidate 
)

Copy constructor.

Parameters
srcSource UTF-8 string
validateVerify that the source character encoding is really UTF-8

◆ CStringUTF8_DEPRECATED() [3/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const CTempString  src)

Constructor from a C/C++ string.

Parameters
srcSource string
encodingCharacter encoding of the source string
validateVerify the character encoding of the source
Deprecated:
Use utility class CUtf8 instead

◆ CStringUTF8_DEPRECATED() [4/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const char *  src)

◆ CStringUTF8_DEPRECATED() [5/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const string src)

◆ CStringUTF8_DEPRECATED() [6/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const CTempString  src,
EEncoding  encoding,
EValidate  validate = eNoValidate 
)

◆ CStringUTF8_DEPRECATED() [7/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const char *  src,
EEncoding  encoding,
EValidate  validate = eNoValidate 
)

◆ CStringUTF8_DEPRECATED() [8/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const string src,
EEncoding  encoding,
EValidate  validate = eNoValidate 
)

◆ CStringUTF8_DEPRECATED() [9/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const TStringUnicode src)

Constructor from Unicode string.

Parameters
srcSource string
Deprecated:
Use utility class CUtf8 instead

◆ CStringUTF8_DEPRECATED() [10/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const TStringUCS2 src)

◆ CStringUTF8_DEPRECATED() [11/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const wstring &  src)

◆ CStringUTF8_DEPRECATED() [12/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const TUnicodeSymbol src)

Constructor from Unicode character sequence.

Parameters
srcSource zero-terminated character buffer
Deprecated:
Use utility class CUtf8 instead

◆ CStringUTF8_DEPRECATED() [13/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const TCharUCS2 src)

◆ CStringUTF8_DEPRECATED() [14/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( const wchar_t *  src)

◆ CStringUTF8_DEPRECATED() [15/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( ECharBufferType  type,
const TUnicodeSymbol src,
SIZE_TYPE  char_count 
)

Constructor from Unicode character sequence.

Parameters
typeHow to interpret zeros in the source character buffer - as end of string, or as part of the data
srcSource character buffer
char_countNumber of TChars in the buffer
Deprecated:
Use utility class CUtf8 instead

◆ CStringUTF8_DEPRECATED() [16/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( ECharBufferType  type,
const TCharUCS2 src,
SIZE_TYPE  char_count 
)

◆ CStringUTF8_DEPRECATED() [17/17]

CStringUTF8_DEPRECATED::CStringUTF8_DEPRECATED ( ECharBufferType  type,
const wchar_t *  src,
SIZE_TYPE  char_count 
)

Member Function Documentation

◆ Append() [1/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( char  ch,
EEncoding  encoding 
)

Append single character.

Parameters
chCharacter
encodingCharacter encoding
Deprecated:
Use utility class CUtf8 instead

◆ Append() [2/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( const CTempString  src,
EEncoding  encoding,
EValidate  validate = eNoValidate 
)

Append a C/C++ string.

Parameters
srcSource string
encodingCharacter encoding of the source string
validateVerify the character encoding of the source
Deprecated:
Use utility class CUtf8 instead

◆ Append() [3/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( const TCharUCS2 src)

◆ Append() [4/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( const TStringUCS2 src)

◆ Append() [5/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( const TStringUnicode src)

Append Unicode C++ string.

Parameters
srcSource string
Deprecated:
Use utility class CUtf8 instead

◆ Append() [6/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( const TUnicodeSymbol src)

Append Unicode C string.

Parameters
srcSource zero-terminated character buffer
Deprecated:
Use utility class CUtf8 instead

◆ Append() [7/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( const wchar_t *  src)

◆ Append() [8/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( const wstring &  src)

◆ Append() [9/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( ECharBufferType  type,
const TCharUCS2 src,
SIZE_TYPE  char_count 
)

◆ Append() [10/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( ECharBufferType  type,
const TUnicodeSymbol src,
SIZE_TYPE  char_count 
)

Append Unicode C string or character buffer.

Parameters
typeHow to interpret zeros in the source character buffer - as end of string, or as part of the data
srcSource character buffer
char_countNumber of TChars in the buffer
Deprecated:
Use utility class CUtf8 instead

◆ Append() [11/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( ECharBufferType  type,
const wchar_t *  src,
SIZE_TYPE  char_count 
)

◆ Append() [12/12]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Append ( TUnicodeSymbol  ch)

Append single Unicode code point.

Parameters
chUnicode code point
Deprecated:
Use utility class CUtf8 instead

◆ AsBasicString() [1/3]

template<typename TChar >
static basic_string<TChar> CStringUTF8_DEPRECATED::AsBasicString ( const CTempString  src)
static

Conversion to Unicode string with any base type we need.

Deprecated:
Use utility class CUtf8 instead

◆ AsBasicString() [2/3]

template<typename TChar >
static basic_string<TChar> CStringUTF8_DEPRECATED::AsBasicString ( const CTempString  src,
const TChar substitute_on_error,
EValidate  validate = eNoValidate 
)
static

Conversion to Unicode string with any base type we need.

Deprecated:
Use utility class CUtf8 instead

◆ AsBasicString() [3/3]

template<typename TChar >
basic_string<TChar> CStringUTF8_DEPRECATED::AsBasicString ( const TChar substitute_on_error = 0) const

Conversion to Unicode string with any base type we need.

Deprecated:
Use utility class CUtf8 instead

◆ AsLatin1()

string CStringUTF8_DEPRECATED::AsLatin1 ( const char *  substitute_on_error = 0) const

Convert to ISO 8859-1 (Latin1) character representation.

Can throw a CStringException if the conversion is impossible or the string has invalid UTF-8 encoding.

Parameters
substitute_on_errorIf the conversion is impossible, append the provided string or, if substitute_on_error equals 0, throw the exception
Deprecated:
Use utility class CUtf8 instead

◆ Assign() [1/11]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Assign ( char  ch,
EEncoding  encoding 
)

Assign a single character.

Parameters
chCharacter
encodingCharacter encoding
Deprecated:
Use utility class CUtf8 instead

◆ Assign() [2/11]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Assign ( const CTempString  src,
EEncoding  encoding,
EValidate  validate = eNoValidate 
)

Assign C/C++ string.

Parameters
srcSource string
encodingCharacter encoding of the source string
validateVerify the character encoding of the source
Deprecated:
Use utility class CUtf8 instead

◆ Assign() [3/11]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Assign ( const TCharUCS2 src)

◆ Assign() [4/11]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Assign ( const TStringUCS2 src)

◆ Assign() [5/11]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Assign ( const TStringUnicode src)

Assign Unicode C++ string.

Parameters
srcSource string
Deprecated:
Use utility class CUtf8 instead

◆ Assign() [6/11]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Assign ( const TUnicodeSymbol src)

Assign Unicode C string.

Parameters
srcSource zero-terminated character buffer
Deprecated:
Use utility class CUtf8 instead

◆ Assign() [7/11]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Assign ( const wchar_t *  src)

◆ Assign() [8/11]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Assign ( const wstring &  src)

◆ Assign() [9/11]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Assign ( ECharBufferType  type,
const TCharUCS2 src,
SIZE_TYPE  char_count 
)

◆ Assign() [10/11]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Assign ( ECharBufferType  type,
const TUnicodeSymbol src,
SIZE_TYPE  char_count 
)

Assign Unicode C string or character buffer.

Parameters
typeHow to interpret zeros in the source character buffer - as end of string, or as part of the data
srcSource character buffer
char_countNumber of TChars in the buffer
Deprecated:
Use utility class CUtf8 instead

◆ Assign() [11/11]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::Assign ( ECharBufferType  type,
const wchar_t *  src,
SIZE_TYPE  char_count 
)

◆ AsSingleByteString()

string CStringUTF8_DEPRECATED::AsSingleByteString ( EEncoding  encoding,
const char *  substitute_on_error = 0 
) const

Convert the string to a single-byte character representation.

Can throw a CStringException if the conversion is impossible or the string has invalid UTF-8 encoding.

Parameters
encodingDesired encoding
substitute_on_errorIf the conversion is impossible, append the provided string or, if substitute_on_error equals 0, throw the exception
Returns
C++ string
Deprecated:
Use utility class CUtf8 instead

◆ AsUCS2()

TStringUCS2 CStringUTF8_DEPRECATED::AsUCS2 ( const TCharUCS2 substitute_on_error = 0) const

Convert to UCS-2 for all platforms.

Can throw a CStringException if the conversion is impossible or the string has invalid UTF-8 encoding.

Parameters
substitute_on_errorIf the conversion is impossible, append the provided string or, if substitute_on_error equals 0, throw the exception
Deprecated:
Use utility class CUtf8 instead

◆ AsUnicode()

wstring CStringUTF8_DEPRECATED::AsUnicode ( const wchar_t *  substitute_on_error = 0) const

Convert to Unicode (UCS-2 with no surrogates where sizeof(wchar_t) == 2 and UCS-4 where sizeof(wchar_t) == 4).

Can throw a CStringException if the conversion is impossible or the string has invalid UTF-8 encoding. Defined only if wstring is supported by the compiler.

Parameters
substitute_on_errorIf the conversion is impossible, append the provided string or, if substitute_on_error equals 0, throw the exception
Deprecated:
Use utility class CUtf8 instead

◆ GetSymbolCount()

SIZE_TYPE CStringUTF8_DEPRECATED::GetSymbolCount ( void  ) const

Get the number of symbols (code points) in the string.

Returns
Number of symbols (code points)
Deprecated:
Use utility class CUtf8 instead

◆ IsValid()

bool CStringUTF8_DEPRECATED::IsValid ( void  ) const

Get the number of symbols (code points) in the string.

Returns
Number of symbols (code points)
Deprecated:
Use utility class CUtf8 instead

Get the number of valid UTF-8 symbols (code points) in the buffer

Parameters
srcCharacter buffer
buf_sizeThe number of bytes in the buffer
Returns
Number of valid symbols (no exception thrown)
Deprecated:
Use utility class CUtf8 instead

Get the number of valid UTF-8 symbols (code points) in the char buffer

Parameters
srcZero-terminated character buffer, or string
Returns
Number of valid symbols (no exception thrown)
Deprecated:
Use utility class CUtf8 instead

Get the number of valid UTF-8 bytes (code units) in the buffer

Parameters
srcCharacter buffer
buf_sizeThe number of bytes in the buffer
Returns
Number of valid bytes (no exception thrown)
Deprecated:
Use utility class CUtf8 instead

Get the number of valid UTF-8 bytes (code units) in the char buffer

Parameters
srcZero-terminated character buffer, or string
Returns
Number of valid bytes (no exception thrown)
Deprecated:
Use utility class CUtf8 instead

Check that the character encoding of the string is valid UTF-8

Returns
Result of the check
Deprecated:
Use utility class CUtf8 instead

◆ operator+=() [1/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator+= ( const CStringUTF8_DEPRECATED src)

Append UTF8 string.

◆ operator+=() [2/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator+= ( const TCharUCS2 src)

◆ operator+=() [3/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator+= ( const TStringUCS2 src)

◆ operator+=() [4/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator+= ( const TStringUnicode src)

Append Unicode C++ string.

Parameters
srcSource string
Deprecated:
Use utility class CUtf8 instead

◆ operator+=() [5/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator+= ( const TUnicodeSymbol src)

Append Unicode C string.

Parameters
srcSource zero-terminated character buffer
Deprecated:
Use utility class CUtf8 instead

◆ operator+=() [6/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator+= ( const wchar_t *  src)

◆ operator+=() [7/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator+= ( const wstring &  src)

◆ operator=() [1/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator= ( const CStringUTF8_DEPRECATED src)

Assign UTF8 string.

◆ operator=() [2/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator= ( const TCharUCS2 src)

◆ operator=() [3/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator= ( const TStringUCS2 src)

◆ operator=() [4/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator= ( const TStringUnicode src)

Assign Unicode C++ string.

Parameters
srcSource string
Deprecated:
Use utility class CUtf8 instead

◆ operator=() [5/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator= ( const TUnicodeSymbol src)

Assign Unicode C string.

Parameters
srcSource zero-terminated character buffer
Deprecated:
Use utility class CUtf8 instead

◆ operator=() [6/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator= ( const wchar_t *  src)

◆ operator=() [7/7]

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::operator= ( const wstring &  src)

◆ TruncateSpacesInPlace()

CStringUTF8_DEPRECATED& CStringUTF8_DEPRECATED::TruncateSpacesInPlace ( NStr::ETrunc  side = NStr::eTrunc_Both)

Guess the encoding of the C/C++ string.

It can distinguish between UTF-8, Latin1, and Win1252 only

Parameters
srcSource zero-terminated character buffer
Returns
Encoding
Deprecated:
Use utility class CUtf8 instead

Check the encoding of the C/C++ string

Check that the encoding of the source is the same, or is compatible with the specified one

Parameters
srcSource string
encodingCharacter encoding form to check against
Returns
Boolean result: encoding is same or compatible
Deprecated:
Use utility class CUtf8 instead

Give Encoding name as string

NOTE: Function throws CStringException on attempt to get name of eEncoding_Unknown

Parameters
encodingEEncoding enum
Returns
Encoding name
Deprecated:
Use utility class CUtf8 instead

Convert encoding name into EEncoding enum, taking into account synonyms as per http://www.iana.org/assignments/character-sets

NOTE: Function returns eEncoding_Unknown for unsupported encodings

Parameters
strEncoding name
Returns
EEncoding enum
Deprecated:
Use utility class CUtf8 instead

Convert encoded character into UTF16

Parameters
chEncoded character
encodingCharacter encoding
Returns
Code point
Deprecated:
Use utility class CUtf8 instead

Convert Unicode code point into encoded character

Parameters
symCode point
encodingCharacter encoding
Returns
Encoded character
Deprecated:
Use utility class CUtf8 instead

Convert sequence of UTF8 code units into Unicode code point

Parameters
srcUTF8 zero-terminated buffer
Returns
Unicode code point
Deprecated:
Use utility class CUtf8 instead

Determines if a symbol is whitespace per http://unicode.org/charts/uca/chart_Whitespace.html

Parameters
chUUnicode code point
See also
TruncateSpacesInPlace, TruncateSpaces_Unsafe, TruncateSpaces
Deprecated:
Use utility class CUtf8 instead

Truncate spaces in the string (in-place)

Parameters
sideWhich end of the string to truncate spaces from. Default is to truncate spaces from both ends (eTrunc_Both).
Returns
Reference to itself
See also
IsWhiteSpace, TruncateSpaces_Unsafe, TruncateSpaces
Deprecated:
Use utility class CUtf8 instead

◆ x_Append() [1/3]

void CStringUTF8_DEPRECATED::x_Append ( const CTempString  src,
EEncoding  encoding,
EValidate  validate = eNoValidate 
)
private

Convert coded character sequence into UTF8 and append.

◆ x_Append() [2/3]

template<typename TChar >
void CStringUTF8_DEPRECATED::x_Append ( const TChar src,
SIZE_TYPE  to = NPOS,
ECharBufferType  type = eZeroTerminated 
)
private

◆ x_Append() [3/3]

template<typename TIterator >
void CStringUTF8_DEPRECATED::x_Append ( TIterator  from,
TIterator  to 
)
private

Convert Unicode character sequence into UTF8 and append Sequence can be in UCS-4 (TChar == (U)Int4), UCS-2 (TChar == (U)Int2) or in ISO8859-1 (TChar == char)

◆ x_AppendChar()

void CStringUTF8_DEPRECATED::x_AppendChar ( TUnicodeSymbol  ch)
private

Convert Unicode code point into UTF8 and append.

◆ x_AsBasicString()

template<typename TChar >
static basic_string<TChar> CStringUTF8_DEPRECATED::x_AsBasicString ( const CTempString  src,
const TChar substitute_on_error,
EValidate  validate 
)
staticprivate

◆ x_BytesNeeded()

static SIZE_TYPE CStringUTF8_DEPRECATED::x_BytesNeeded ( TUnicodeSymbol  ch)
staticprivate

Check how many bytes is needed to represent the code point in UTF8.

◆ x_Decode()

template<typename TIterator >
static TUnicodeSymbol CStringUTF8_DEPRECATED::x_Decode ( TIterator src)
staticprivate

◆ x_EvalFirst()

static bool CStringUTF8_DEPRECATED::x_EvalFirst ( char  ch,
SIZE_TYPE more 
)
staticprivate

Check if the character is valid first code unit of UTF8.

◆ x_EvalNext()

static bool CStringUTF8_DEPRECATED::x_EvalNext ( char  ch)
staticprivate

Check if the character is valid non-first code unit of UTF8.

◆ x_Validate()

void CStringUTF8_DEPRECATED::x_Validate ( void  ) const
private

Truncate spaces in the string.

Parameters
strsource string, in UTF8 encoding
sideWhich end of the string to truncate spaces from. Default is to truncate spaces from both ends (eTrunc_Both).
Attention
The lifespan of the result string is the same as one of the source. So, for example, if the source is temporary string, the result will be invalid right away (will point to already released memory).
See also
IsWhiteSpace, TruncateSpacesInPlace, TruncateSpaces, CTempString
Deprecated:
Use utility class CUtf8 instead

Truncate spaces in the string

Parameters
strsource string, in UTF8 encoding
sideWhich end of the string to truncate spaces from. Default is to truncate spaces from both ends (eTrunc_Both).
See also
IsWhiteSpace, TruncateSpacesInPlace, TruncateSpaces_Unsafe
Deprecated:
Use utility class CUtf8 instead

Convert first character of UTF8 sequence into Unicode

Parameters
chcharacter
moreif the character is valid, - how many more characters to expect
Returns
non-zero, if the character is valid
Deprecated:
Use utility class CUtf8 instead

Convert next character of UTF8 sequence into Unicode

Parameters
chcharacter
chUUnicode code point
Returns
non-zero, if the character is valid
Deprecated:
Use utility class CUtf8 instead

The documentation for this class was generated from the following file:
Modified on Wed Apr 17 13:09:46 2024 by modify_doxy.py rev. 669887