parent
ec3a5620d0
commit
d75f46280d
|
@ -19,7 +19,7 @@ so you can assign unicode to string<c8> and ascii to string<wchar_t>
|
||||||
Note that the conversation between both is not done using an encoding.
|
Note that the conversation between both is not done using an encoding.
|
||||||
|
|
||||||
Known bugs:
|
Known bugs:
|
||||||
Special characters like 'Ä', 'Ü' and 'Ö' are ignored in the
|
Special characters like 'Ä', 'Ü' and 'Ö' are ignored in the
|
||||||
methods make_upper, make_lower and equals_ignore_case.
|
methods make_upper, make_lower and equals_ignore_case.
|
||||||
*/
|
*/
|
||||||
template <class T>
|
template <class T>
|
||||||
|
@ -29,7 +29,7 @@ public:
|
||||||
|
|
||||||
//! Default constructor
|
//! Default constructor
|
||||||
string()
|
string()
|
||||||
: allocated(1), used(1), array(0)
|
: array(0), allocated(1), used(1)
|
||||||
{
|
{
|
||||||
array = new T[1];
|
array = new T[1];
|
||||||
array[0] = 0x0;
|
array[0] = 0x0;
|
||||||
|
@ -39,7 +39,7 @@ public:
|
||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
string(const string<T>& other)
|
string(const string<T>& other)
|
||||||
: allocated(0), used(0), array(0)
|
: array(0), allocated(0), used(0)
|
||||||
{
|
{
|
||||||
*this = other;
|
*this = other;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public:
|
||||||
|
|
||||||
//! Constructs a string from an int
|
//! Constructs a string from an int
|
||||||
string(int number)
|
string(int number)
|
||||||
: allocated(0), used(0), array(0)
|
: array(0), allocated(0), used(0)
|
||||||
{
|
{
|
||||||
// store if negative and make positive
|
// store if negative and make positive
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public:
|
||||||
//! Constructor for copying a string from a pointer with a given lenght
|
//! Constructor for copying a string from a pointer with a given lenght
|
||||||
template <class B>
|
template <class B>
|
||||||
string(const B* c, s32 lenght)
|
string(const B* c, s32 lenght)
|
||||||
: allocated(0), used(0), array(0)
|
: array(0), allocated(0), used(0)
|
||||||
{
|
{
|
||||||
if (!c)
|
if (!c)
|
||||||
return;
|
return;
|
||||||
|
@ -117,7 +117,7 @@ public:
|
||||||
//! Constructor for unicode and ascii strings
|
//! Constructor for unicode and ascii strings
|
||||||
template <class B>
|
template <class B>
|
||||||
string(const B* c)
|
string(const B* c)
|
||||||
: allocated(0), used(0), array(0)
|
: array(0), allocated(0), used(0)
|
||||||
{
|
{
|
||||||
*this = c;
|
*this = c;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue