#include <it_bus/string.h>
Inheritance diagram for IT_Bus::String:
It has roughly the same interface as the ISO/ANSI C++ std::basic_string class.
Definition at line 21 of file string.h.
Public Types | |
typedef char * | iterator |
typedef const char * | const_iterator |
typedef IT_UShort | UChar |
Represents a utf16 code point. | |
enum | |
enum | |
Public Member Functions | |
String (const char *str, IT_StringRep::Policy policy, size_t n=npos, const char *encoding=0, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) | |
IONA-specific constructor to allow an String to refer to an existing char[] without copying it. | |
String (const UChar *uchars, IT_StringRep::Policy policy, size_t n=npos, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) | |
Constructor from utf16 characters. | |
String (const UChar *sb, const IT_String &encoding, size_t n=npos, IT_StringRep::Policy policy=IT_StringRep::COPY, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) | |
Deprecated. | |
String (const wchar_t *wb, size_t n=npos, IT_StringRep::Policy policy=IT_StringRep::COPY, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) | |
Constructor from wchar_t*. | |
size_t | max_size () const |
char | operator[] (size_t index) const |
char & | at (size_t index) |
String & | operator= (const String &other) |
String & | operator= (const IT_String &other) |
String & | operator= (const char *str) |
String & | operator= (char c) |
iterator | insert (iterator p, char c= '\0', IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) |
String & | insert (size_t pos, const UChar *uchars, size_t n=npos, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) |
Insert utf16 characters. | |
String & | operator+= (const IT_String &other) |
String & | operator+= (const String &other) |
String & | operator+= (const char *str) |
String & | operator+= (char c) |
String & | append (const UChar *uchars, size_t n=npos, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) |
Append utf16 characters. | |
iterator | erase (iterator p, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) |
iterator | erase (iterator first, iterator last, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) |
String & | replace (size_t pos, size_t n, const UChar *uchars, size_t n2=npos, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) |
Replace with utf16 string. | |
int | compare (size_t pos1, size_t n1, const String &s, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) const |
int | compare (size_t pos1, size_t n1, const String &s, size_t pos2, size_t n2, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) const |
Static Public Attributes | |
static const String | EMPTY |
Private Attributes | |
StringBody * | m_body |
IT_Bus::String::String | ( | const char * | str, | |
IT_StringRep::Policy | policy, | |||
size_t | n = npos , |
|||
const char * | encoding = 0 , |
|||
IT_ExceptionHandler & | eh = IT_EXCEPTION_HANDLER | |||
) |
IONA-specific constructor to allow an String to refer to an existing char[] without copying it.
This is not a C++ standard string constructor.
IT_Bus::String::String | ( | const UChar * | uchars, | |
IT_StringRep::Policy | policy, | |||
size_t | n = npos , |
|||
IT_ExceptionHandler & | eh = IT_EXCEPTION_HANDLER | |||
) |
Constructor from utf16 characters.
uchars | utf16 character array. | |
policy | COPY to copy uchars, REFER to | |
n | Number of utf16 characters. If unspecified assume uchars is null terminated point to uchars without copying. |
String& IT_Bus::String::append | ( | const UChar * | uchars, | |
size_t | n = npos , |
|||
IT_ExceptionHandler & | eh = IT_EXCEPTION_HANDLER | |||
) |
Append utf16 characters.
uchars | utf16 characters to insert. | |
n | Number of utf16 characters. If unspecified assume uchars is null terminated. |
String& IT_Bus::String::insert | ( | size_t | pos, | |
const UChar * | uchars, | |||
size_t | n = npos , |
|||
IT_ExceptionHandler & | eh = IT_EXCEPTION_HANDLER | |||
) |
Insert utf16 characters.
pos | Position to insert. | |
uchars | utf16 characters to insert. | |
n | Number of utf16 characters. If unspecified assume uchars is null terminated. |
String& IT_Bus::String::replace | ( | size_t | pos, | |
size_t | n, | |||
const UChar * | uchars, | |||
size_t | n2 = npos , |
|||
IT_ExceptionHandler & | eh = IT_EXCEPTION_HANDLER | |||
) |
Replace with utf16 string.
pos | Position of text to replace. | |
n | Length of text to replace. | |
uchars | utf16 string. | |
n | Length of uchars, npos means uchars is null terminated. |