MyScript Interactive Ink SDK  3.1.3
Public Member Functions | List of all members
myscript::iink::String Class Reference

#include <String.h>

Public Member Functions

 String ()
 
 String (const String &str)
 
 String (const std::string &str)
 
 String (std::string &&str)
 
 String (const char *str)
 
 String (const std::u16string &str)
 
 String (std::u16string &&str)
 
 String (const char16_t *str)
 
virtual ~String ()
 
String & operator= (const String &other)
 
String & operator= (String &&other)
 
bool isUtf8 () const
 
bool isUtf16 () const
 
bool isEmpty () const
 
String toUtf8 () const
 
String toUtf16 () const
 
 operator std::string () const
 
 operator std::u16string () const
 
int compare (const char *other) const
 
int compare (const std::string &other) const
 
int compare (const char16_t *other) const
 
int compare (const std::u16string &other) const
 
int compare (const String &other) const
 
bool operator== (const String &other) const
 
bool operator!= (const String &other) const
 
bool operator< (const String &other) const
 
bool operator<= (const String &other) const
 
bool operator> (const String &other) const
 
bool operator>= (const String &other) const
 

Detailed Description

Represents a sequence of characters with automatic conversion between UTF-8 and UTF-16.

Constructor & Destructor Documentation

◆ String() [1/8]

myscript::iink::String::String ( )

Constructs an empty string.

◆ String() [2/8]

myscript::iink::String::String ( const String &  str)

Constructs a copy of the specified string.

Parameters
strthe string to copy.

◆ String() [3/8]

myscript::iink::String::String ( const std::string &  str)

Constructs a string from its UTF-8 representation.

Parameters
strthe UTF-8 representation to copy.

◆ String() [4/8]

myscript::iink::String::String ( std::string &&  str)

Constructs a string from its UTF-8 representation.

Parameters
strthe UTF-8 representation to move.

◆ String() [5/8]

myscript::iink::String::String ( const char *  str)

Constructs a string from its UTF-8 representation.

Parameters
strthe UTF-8 representation.

◆ String() [6/8]

myscript::iink::String::String ( const std::u16string &  str)

Constructs a string from its UTF-16 representation.

Parameters
strthe UTF-16 representation to copy.

◆ String() [7/8]

myscript::iink::String::String ( std::u16string &&  str)

Constructs a string from its UTF-16 representation.

Parameters
strthe UTF-16 representation to move.

◆ String() [8/8]

myscript::iink::String::String ( const char16_t *  str)

Constructs a string from its UTF-16 representation.

Parameters
strthe UTF-16 representation.

◆ ~String()

virtual myscript::iink::String::~String ( )
virtual

Member Function Documentation

◆ operator=() [1/2]

String& myscript::iink::String::operator= ( const String &  other)

Copy assigns the other string to this string.

Parameters
otherthe string to copy.
Returns
a reference to this string.

◆ operator=() [2/2]

String& myscript::iink::String::operator= ( String &&  other)

Move assigns the other string to this string.

Parameters
otherthe string to move.
Returns
a reference to this string.

◆ isUtf8()

bool myscript::iink::String::isUtf8 ( ) const

Tells whether the internal representation of this string is UTF-8.

Returns
true if the internal representation is UTF-8.

◆ isUtf16()

bool myscript::iink::String::isUtf16 ( ) const

Tells whether the internal representation of this string is UTF-16.

Returns
true if the internal representation is UTF-16.

◆ isEmpty()

bool myscript::iink::String::isEmpty ( ) const

Tells whether this string is empty.

Returns
true if this string is empty.

◆ toUtf8()

String myscript::iink::String::toUtf8 ( ) const

Converts this string to UTF-8.

Returns
a copy of this string with UTF-8 internal representation.

◆ toUtf16()

String myscript::iink::String::toUtf16 ( ) const

Converts this string to UTF-16.

Returns
a copy of this string with UTF-16 internal representation.

◆ operator std::string()

myscript::iink::String::operator std::string ( ) const

Returns the UTF-8 representation of this string.

Returns
the UTF-8 representation.

◆ operator std::u16string()

myscript::iink::String::operator std::u16string ( ) const

Returns the UTF-16 representation of this string.

Returns
the UTF-16 representation.

◆ compare() [1/5]

int myscript::iink::String::compare ( const char *  other) const

◆ compare() [2/5]

int myscript::iink::String::compare ( const std::string &  other) const

◆ compare() [3/5]

int myscript::iink::String::compare ( const char16_t *  other) const

◆ compare() [4/5]

int myscript::iink::String::compare ( const std::u16string &  other) const

◆ compare() [5/5]

int myscript::iink::String::compare ( const String &  other) const

◆ operator==()

bool myscript::iink::String::operator== ( const String &  other) const

◆ operator!=()

bool myscript::iink::String::operator!= ( const String &  other) const

◆ operator<()

bool myscript::iink::String::operator< ( const String &  other) const

◆ operator<=()

bool myscript::iink::String::operator<= ( const String &  other) const

◆ operator>()

bool myscript::iink::String::operator> ( const String &  other) const

◆ operator>=()

bool myscript::iink::String::operator>= ( const String &  other) const

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