47#ifndef vtkUnicodeString_h
48#define vtkUnicodeString_h
50#include "vtkCommonCoreModule.h"
66#define vtkSuperExtraExtendedTemplateMacro(call) \
67 vtkExtraExtendedTemplateMacro(call); \
68 vtkTemplateMacroCase(VTK_UNICODE_STRING, vtkUnicodeString, call)
107 std::string::const_iterator
Position;
293 class back_insert_iterator;
const_iterator operator++(int)
std::string::difference_type difference_type
std::bidirectional_iterator_tag iterator_category
const_iterator & operator--()
const_iterator operator--(int)
bool operator==(const const_iterator &) const
bool operator!=(const const_iterator &) const
value_type operator*() const
const_iterator & operator++()
vtkUnicodeStringValueType value_type
String class that stores Unicode text.
void swap(vtkUnicodeString &)
Swap the sequences stored by two strings.
const char * utf8_str() const
Returns the sequence as a null-terminated sequence of UTF-8 encoded characters.
static vtkUnicodeString from_utf16(const vtkTypeUInt16 *)
Constructs a string from a null-terminated sequence of UTF-16 encoded characters.
vtkUnicodeStringValueType value_type
bool empty() const
Returns true if the string contains an empty sequence.
vtkUnicodeString substr(size_type offset=0, size_type count=npos) const
Returns a subset of the current sequence that up-to 'count' characters in length, starting at charact...
void push_back(value_type)
Append a Unicode character to the end of the sequence.
void append(const vtkUnicodeString &value)
Append Unicode to the current sequence.
std::string::size_type size_type
void assign(const vtkUnicodeString &value)
Replace the current sequence with another.
const_iterator end() const
Returns a forward iterator that points just beyond the end of the sequence.
value_type at(size_type offset) const
Returns the Unicode character at the given character offset within the sequence, or throws std::out_o...
static vtkUnicodeString from_utf8(const char *)
Constructs a string from a null-terminated sequence of UTF-8 encoded characters.
std::vector< vtkTypeUInt16 > utf16_str() const
Returns the sequence as a collection of UTF-16 encoded characters.
int compare(const vtkUnicodeString &) const
Returns a negative value if the sequence compares less-than the operand sequence, zero if the two seq...
size_type character_count() const
Returns the number of characters (not bytes) in the sequence.
const_iterator begin() const
Returns a forward iterator that points at the first element of the sequence (or just beyond the end o...
static bool is_utf8(const char *)
Tests a sequence of bytes, returning true iff they are a valid UTF-8 sequence.
static const size_type npos
The largest representable value of size_type, used as a special-code.
vtkUnicodeString fold_case() const
Returns a copy of the current sequence, modified so that differences in case are eliminated.
size_type byte_count() const
Returns the number of bytes (not characters) in the sequence.
void clear()
Resets the string to an empty sequence.
#define VTK_DEPRECATED_IN_9_1_0(reason)
VTKCOMMONCORE_EXPORT bool operator!=(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
vtkTypeUInt32 vtkUnicodeStringValueType
VTKCOMMONCORE_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
VTKCOMMONCORE_EXPORT bool operator>(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
VTKCOMMONCORE_EXPORT bool operator<(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
VTKCOMMONCORE_EXPORT bool operator>=(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
VTKCOMMONCORE_EXPORT bool operator<=(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)