#include <ustring.h>
Public Methods | |
| UString () | |
| UString (char c) | |
| UString (const char *c) | |
| UString (const UChar *c, int length) | |
| UString (UChar *c, int length, bool copy) | |
| UString (const UString &) | |
| UString (const QString &) | |
| UString (const DOM::DOMString &) | |
| ~UString () | |
| UString & | append (const UString &) |
| CString | cstring () const |
| char * | ascii () const |
| DOM::DOMString | string () const |
| QString | qstring () const |
| QConstString | qconststring () const |
| UString & | operator= (const char *c) |
| UString & | operator= (const UString &) |
| UString & | operator+= (const UString &s) |
| const UChar * | data () const |
| bool | isNull () const |
| bool | isEmpty () const |
| bool | is8Bit () const |
| int | size () const |
| UChar | operator[] (int pos) const |
| UCharReference | operator[] (int pos) |
| double | toDouble (bool tolerant=false) const |
| unsigned long | toULong (bool *ok=0L) const |
| UString | toLower () const |
| UString | toUpper () const |
| int | find (const UString &f, int pos=0) const |
| int | rfind (const UString &f, int pos) const |
| UString | substr (int pos=0, int len=-1) const |
Static Public Methods | |
| UString | from (int i) |
| UString | from (unsigned int u) |
| UString | from (double d) |
Static Public Attributes | |
| UString | null |
Definition at line 187 of file ustring.h.
|
|
Constructs a null string. |
|
|
Constructs a string from the single character c. |
|
|
Constructs a string from a classical zero determined char string. |
|
||||||||||||
|
Constructs a string from an array of Unicode characters of the specified length. |
|
||||||||||||||||
|
If copy is false a shallow copy of the string will be created. That means that the data will NOT be copied and you'll have to guarantee that it doesn't get deleted during the lifetime of the UString object. Behaviour defaults to a deep copy if copy is true. |
|
|
Copy constructor. Makes a shallow copy only. |
|
|
Convenience declaration only ! You'll be on your own to write the implementation for a construction from QString. Note: feel free to contact me if you want to see a dummy header for your favourite FooString class here ! |
|
|
Convenience declaration only ! See UString(const QString&). |
|
|
Destructor. If this handle was the only one holding a reference to the string the data will be freed. |
|
|
Append another string. |
|
|
Convert the Unicode string to plain ASCII chars chopping of any higher bytes. This method should only be used for *debugging* purposes as it is neither Unicode safe nor free from side effects. In order not to waste any memory the char buffer is static and *shared* by all UString instances. |
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
Constructs a string from a double. |
|
|
Constructs a string from an unsigned int. |
|
|
Constructs a string from an int. |
|
|
Use this if you want to make sure that this string is a plain ASCII string. For example, if you don't want to lose any information when using cstring() or ascii().
|
|
|
|
|
|
|
|
|
Appends the specified string. |
|
|
Assignment operator. |
|
|
Assignment operator. |
|
|
Writable reference to character at specified position. |
|
|
Const character at specified position. |
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
Attempts an conversion to a number. Apart from floating point numbers, the algorithm will recognize hexadecimal representations (as indicated by a 0x or 0X prefix) and +/- Infinity. Returns NaN if the conversion failed.
|
|
|
Returns this string converted to lower case characters |
|
|
Attempts an conversion to an unsigned long integer. ok will be set according to the success. |
|
|
Returns this string converted to upper case characters |
|
|
Static instance of a null string. |
1.2.18