#include <bt_xstring.h>
Public Member Functions | |
const bt_xwstring & | append (const BT_UInt16 *p, size_t n) |
Appends a string to this bt_xwstring object. | |
const bt_xwstring & | assign (const char *utf8_str) |
Replaces the value of the string object with the value of UTF-8 encoded character string. | |
const bt_xwstring & | assign (const BT_UInt16 *str, size_t n) |
Replaces the value of the string object with part of the value of a BT_UInt16 string. | |
const bt_xwstring & | assign (const BT_UInt16 *str) |
Replaces the value of the string object with the value of a null-terminated BT_UInt16 string. | |
const bt_xwstring & | assign (const bt_xwstring &str) |
Replaces the value of the string object with the value of another string object. | |
BT_UInt16 | at (size_t i) const |
Retrieves a character in a BT_Uint16 string. | |
BT_UInt16 & | at (size_t i) |
Retrieves a character in a BT_Uint16 string. | |
bt_xwstring (const char *utf8_string) | |
Constructs a bt_xwstring from a UTF-8 character string. | |
bt_xwstring (const BT_UInt16 *s) | |
Constructs a bt_xwstring from a null-terminated UTF-16 string. | |
bt_xwstring (const BT_UInt16 *s, size_t n) | |
Constructs a bt_xwstring from a fixed length UTF-16 string. | |
bt_xwstring (const bt_xwstring &other, size_t pos, size_t n=npos) | |
Constructs a bt_xwstring from a substring of another bt_xwstring. | |
bt_xwstring (const bt_xwstring &other) | |
Copy Constructor. | |
const bt_xwstring & | byte_swap () |
Changes the character byte order of this bt_xwstring object. | |
const BT_UInt16 * | c_str () const |
Retrieves a pointer to this string's C-style string representation. | |
size_t | capacity () const |
Returns the capacity of this string. | |
int | compare (const bt_xwstring &str) const |
Compares this bt_xwstring object with another string. | |
size_t | copy (BT_UInt16 *p, size_t n, size_t pos=0) const |
Copies a portion of this string into a C-style string. | |
const BT_UInt16 * | data () const |
Retrieves a pointer to this string's C-style string representation. | |
bool | empty () const |
Determines if this string is empty. | |
const bt_xwstring & | erase (size_t i, size_t n=npos) |
Deletes contents of this bt_xwstring object. | |
const bt_xwstring & | erase () |
Deletes the contents of this bt_xwstring object. | |
size_t | find (const bt_xwstring &s, size_t i=0) const |
Finds a string in this bt_xwstring. | |
const bt_xwstring & | insert (size_t pos, const BT_UInt16 *s, size_t n=npos) |
Inserts text into this bt_xwstring. | |
const bt_xwstring & | insert (size_t pos, BT_UInt16 c, size_t n=1) |
Inserts text into this bt_xwstring. | |
const bt_xwstring & | insert (size_t pos, bt_xwstring &s) |
Inserts text into this bt_xwstring. | |
size_t | length () const |
Returns the length of this string. | |
const bt_xwstring & | operator+= (BT_UInt16 c) |
Append operator. | |
const bt_xwstring & | operator+= (const BT_UInt16 *p) |
Append operator. | |
const bt_xwstring & | operator+= (const bt_xwstring &p) |
Append operator. | |
const bt_xwstring & | operator= (const BT_UInt16 *str) |
Replaces the value of the string object with the value of another string object. | |
const bt_xwstring & | operator= (const bt_xwstring &str) |
Replaces the value of the string object with the value of another string object. | |
BT_UInt16 | operator[] (size_t i) const |
Retrieves a character in a BT_Uint16 string. | |
BT_UInt16 & | operator[] (size_t i) |
Retrieves a character in a BT_Uint16 string. | |
size_t | size () const |
Returns the length of this string. | |
Static Public Attributes | |
static const size_t | npos |
Represents a missing or unused value. |
bt_xwstring::bt_xwstring | ( | const bt_xwstring & | other | ) |
Copy Constructor
other | bt_xwstring from which to construct this one. |
bt_xwstring::bt_xwstring | ( | const bt_xwstring & | other, | |
size_t | pos, | |||
size_t | n = npos | |||
) |
Constructs a bt_xwstring from a substring of another bt_xwstring.
other | bt_xwstring from which a substring will be used to construct this one. | |
pos | Start position in the source string. | |
n | Number of characters to copy. |
bt_xwstring::bt_xwstring | ( | const BT_UInt16 * | s, | |
size_t | n | |||
) |
Constructs a bt_xwstring from a fixed length UTF-16 string.
s | Pointer to source UTF-16 string. | |
n | Number of characters to copy into this string. |
bt_xwstring::bt_xwstring | ( | const BT_UInt16 * | s | ) |
Constructs a bt_xwstring from a null-terminated UTF-16 string.
s | Pointer to null-terminated source UTF-16 string. |
bt_xwstring::bt_xwstring | ( | const char * | utf8_string | ) |
Constructs a bt_xwstring from a UTF-8 character string.
utf8_string | The source UTF-8 character string. |
const bt_xwstring& bt_xwstring::append | ( | const BT_UInt16 * | p, | |
size_t | n | |||
) |
Appends a string to this bt_xwstring object.
p | String to append. | |
n | Number of characters to append. |
const bt_xwstring& bt_xwstring::assign | ( | const char * | utf8_str | ) |
Replaces the value of the string object with the value of UTF-8 encoded character string.
utf8_str | The UTF-8 encoded character string to be copied. |
const bt_xwstring& bt_xwstring::assign | ( | const BT_UInt16 * | str, | |
size_t | n | |||
) |
Replaces the value of the string object with part of the value of a BT_UInt16 string.
str | The string object to be copied. | |
n | The number of characters to copy. |
const bt_xwstring& bt_xwstring::assign | ( | const BT_UInt16 * | str | ) |
Replaces the value of the string object with the value of a null-terminated BT_UInt16 string.
str | The string object to be copied. |
const bt_xwstring& bt_xwstring::assign | ( | const bt_xwstring & | str | ) |
Replaces the value of the string object with the value of another string object.
str | The string object to be copied. |
BT_UInt16 bt_xwstring::at | ( | size_t | i | ) | const |
Retrieves a character in a BT_Uint16 string.
i | The index of the character to retrieve. |
BT_UInt16& bt_xwstring::at | ( | size_t | i | ) |
Retrieves a reference to a character in a BT_Uint16 string.
i | The index of the character to retrieve. |
const bt_xwstring& bt_xwstring::byte_swap | ( | ) |
Changes the character byte order of this bt_xwstring object
const BT_UInt16* bt_xwstring::c_str | ( | ) | const |
Retrieves a pointer to this string's C-style string representation.
size_t bt_xwstring::capacity | ( | ) | const |
Returns the capacity of this string.
int bt_xwstring::compare | ( | const bt_xwstring & | str | ) | const |
Compares this bt_xwstring object with another string.
str | String to compare. |
size_t bt_xwstring::copy | ( | BT_UInt16 * | p, | |
size_t | n, | |||
size_t | pos = 0 | |||
) | const |
Copies a portion of this string into a C-style string.
p | Pointer to the destination of the copy. | |
n | Number of characgters to copy. | |
pos | Index of the first character to be copied. |
const BT_UInt16* bt_xwstring::data | ( | ) | const |
Retrieves a pointer to this string's C-style string representation.
bool bt_xwstring::empty | ( | ) | const [inline] |
Determines if this string is empty.
const bt_xwstring& bt_xwstring::erase | ( | size_t | i, | |
size_t | n = npos | |||
) |
Deletes contents of this bt_xwstring object.
i | Character index where deletion will start. | |
n | Number of characters to delete. |
const bt_xwstring& bt_xwstring::erase | ( | ) |
Deletes the contents of this bt_xwstring object.
size_t bt_xwstring::find | ( | const bt_xwstring & | s, | |
size_t | i = 0 | |||
) | const |
Finds a string in this bt_xwstring.
s | String to find. | |
i | Index of the search's starting position. |
const bt_xwstring& bt_xwstring::insert | ( | size_t | pos, | |
const BT_UInt16 * | s, | |||
size_t | n = npos | |||
) |
Inserts text into this bt_xwstring at the given position.
pos | Index of the insertion point. | |
s | Sting to insert | |
n | Number of charaters in the string to copy. |
const bt_xwstring& bt_xwstring::insert | ( | size_t | pos, | |
BT_UInt16 | c, | |||
size_t | n = 1 | |||
) |
Inserts text into this bt_xwstring at the given postion.
pos | Index of the insertion point. | |
c | Character to insert | |
n | Number of occurrences of the character to insert. |
const bt_xwstring& bt_xwstring::insert | ( | size_t | pos, | |
bt_xwstring & | s | |||
) |
Inserts text into this bt_xwstring at the given position.
pos | Index of the insertion point. | |
s | The string to be copied. |
size_t bt_xwstring::length | ( | ) | const [inline] |
Returns the length of this string.
const bt_xwstring& bt_xwstring::operator+= | ( | BT_UInt16 | c | ) |
Append operator.
c | Character to append. |
const bt_xwstring& bt_xwstring::operator+= | ( | const BT_UInt16 * | p | ) |
Append operator.
p | Pointer to string append. |
const bt_xwstring& bt_xwstring::operator+= | ( | const bt_xwstring & | p | ) |
Append operator.
p | bt_xwstring to append. |
const bt_xwstring& bt_xwstring::operator= | ( | const BT_UInt16 * | str | ) | [inline] |
Replaces the value of the string object with the value of another string object.
str | The string object to be copied. |
const bt_xwstring& bt_xwstring::operator= | ( | const bt_xwstring & | str | ) | [inline] |
Replaces the value of the string object with the value of another string object.
str | The string object to be copied. |
BT_UInt16 bt_xwstring::operator[] | ( | size_t | i | ) | const |
Retrieves a character in a BT_Uint16 string.
i | The index of the character to retrieve. |
BT_UInt16& bt_xwstring::operator[] | ( | size_t | i | ) |
Retrieves a reference to a character in a BT_Uint16 string.
i | The index of the character to retrieve. |
size_t bt_xwstring::size | ( | ) | const |
Returns the length of this string.
Copyright © 2004-2008 Basis Technology Corporation. All Rights Reserved.