TSDuck v3.38-3696
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
tsUString.h File Reference

Unicode string. More...

Classes

class  ts::UString::RegisterChronoUnit
 A class to register new std::chrono::duration units. More...
 
class  ts::UString
 An implementation of UTF-16 strings. More...
 

Namespaces

namespace  ts
 TSDuck namespace, containing all TSDuck classes and functions.
 

Macros

#define TS_DEPRECATED   [[deprecated("remove brackets '{}'")]]
 Do not declare legacy method as "deprecated".
 
#define TS_REGISTER_CHRONO_UNIT(classname, ...)
 Registration of a new std::chrono::duration unit name.
 

Typedefs

using ts::UStringList = std::list< UString >
 List of strings.
 
using ts::UStringVector = std::vector< UString >
 Vector of strings.
 

Enumerations

enum  ts::StringComparison : uint32_t {
  ts::SCOMP_DEFAULT = 0x0000 ,
  ts::SCOMP_CASE_INSENSITIVE = 0x0001 ,
  ts::SCOMP_IGNORE_BLANKS = 0x0002 ,
  ts::SCOMP_NUMERIC = 0x0004
}
 Options used on string comparisons. More...
 
enum  ts::StringDirection {
  ts::LEFT_TO_RIGHT ,
  ts::RIGHT_TO_LEFT
}
 Direction used on string operations. More...
 

Functions

std::ostream & operator<< (std::ostream &strm, const ts::AbstractNumber &obj)
 Output operator for AbstractNumber objects on standard text streams.
 
std::ostream & operator<< (std::ostream &strm, const ts::StringifyInterface &obj)
 Output operator for stringifiable objects on standard text streams.
 
std::ostream & operator<< (std::ostream &strm, const ts::UChar *str)
 Output operator for Unicode string on standard text streams with UTF-8 conversion.
 
std::ostream & operator<< (std::ostream &strm, const ts::UChar c)
 Output operator for ts::UChar on standard text streams with UTF-8 conversion.
 
std::ostream & operator<< (std::ostream &strm, const ts::UString &str)
 Output operator for ts::UString on standard text streams with UTF-8 conversion.
 

Detailed Description

Unicode string.

Macro Definition Documentation

◆ TS_DEPRECATED

#define TS_DEPRECATED   [[deprecated("remove brackets '{}'")]]

Do not declare legacy method as "deprecated".

The UString class contains printf-like and scanf-like features. Initially, these methods used initializer lists for the variable list of arguments. The new declarations use variadic templates instead of explicit initializer lists. Calling the new overloaded functions is identical, without the brackets. When TS_NODEPRECATE is defined, using the legacy functions does not generate "deprecation" warnings.

◆ TS_REGISTER_CHRONO_UNIT

#define TS_REGISTER_CHRONO_UNIT (   classname,
  ... 
)

Registration of a new std::chrono::duration unit name.

Parameters
classnameAn instance of std::chrono::duration.

Function Documentation

◆ operator<<() [1/5]

std::ostream & operator<< ( std::ostream &  strm,
const ts::UString str 
)

Output operator for ts::UString on standard text streams with UTF-8 conversion.

Parameters
[in,out]strmA standard stream in output mode.
[in]strA string.
Returns
A reference to the strm object.

◆ operator<<() [2/5]

std::ostream & operator<< ( std::ostream &  strm,
const ts::UChar str 
)

Output operator for Unicode string on standard text streams with UTF-8 conversion.

Parameters
[in,out]strmA standard stream in output mode.
[in]strA string.
Returns
A reference to the strm object.

◆ operator<<() [3/5]

std::ostream & operator<< ( std::ostream &  strm,
const ts::UChar  c 
)

Output operator for ts::UChar on standard text streams with UTF-8 conversion.

Parameters
[in,out]strmA standard stream in output mode.
[in]cA character.
Returns
A reference to the strm object.

◆ operator<<() [4/5]

std::ostream & operator<< ( std::ostream &  strm,
const ts::StringifyInterface obj 
)
inline

Output operator for stringifiable objects on standard text streams.

Parameters
[in,out]strmA standard stream in output mode.
[in]objA stringifiable object.
Returns
A reference to the strm object.

◆ operator<<() [5/5]

std::ostream & operator<< ( std::ostream &  strm,
const ts::AbstractNumber obj 
)
inline

Output operator for AbstractNumber objects on standard text streams.

Parameters
[in,out]strmA standard stream in output mode.
[in]objAn AbstractNumber object.
Returns
A reference to the strm object.