Ooops! Should have been part of previous commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27022 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -45,7 +45,7 @@ unicode_to_utf8(uint32 c, char **out)
|
|||||||
\param in Pointer to a C-String from which utf8 characters
|
\param in Pointer to a C-String from which utf8 characters
|
||||||
will be read. *in will be incremented to reflect
|
will be read. *in will be incremented to reflect
|
||||||
the number of characters read, similarly to the
|
the number of characters read, similarly to the
|
||||||
\c out parameter for Udf::unicode_to_utf8().
|
\c out parameter for unicode_to_utf8().
|
||||||
|
|
||||||
\return The 4-byte unicode character, or **in if passed an
|
\return The 4-byte unicode character, or **in if passed an
|
||||||
invalid character, or 0 if passed any NULL pointers.
|
invalid character, or 0 if passed any NULL pointers.
|
||||||
@@ -91,35 +91,34 @@ utf8_to_unicode(const char **in)
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
using namespace Udf;
|
|
||||||
|
|
||||||
/*! \brief Creates an empty string object.
|
/*! \brief Creates an empty string object.
|
||||||
*/
|
*/
|
||||||
String::String()
|
UdfString::UdfString()
|
||||||
: fCs0String(NULL)
|
: fCs0String(NULL)
|
||||||
, fUtf8String(NULL)
|
, fUtf8String(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Creates a new String object from the given Utf8 string.
|
/*! \brief Creates a new UdfString object from the given Utf8 string.
|
||||||
*/
|
*/
|
||||||
String::String(const char *utf8)
|
UdfString::UdfString(const char *utf8)
|
||||||
: fCs0String(NULL)
|
: fCs0String(NULL)
|
||||||
, fUtf8String(NULL)
|
, fUtf8String(NULL)
|
||||||
{
|
{
|
||||||
SetTo(utf8);
|
SetTo(utf8);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Creates a new String object from the given Cs0 string.
|
/*! \brief Creates a new UdfString object from the given Cs0 string.
|
||||||
*/
|
*/
|
||||||
String::String(const char *cs0, uint32 length)
|
UdfString::UdfString(const char *cs0, uint32 length)
|
||||||
: fCs0String(NULL)
|
: fCs0String(NULL)
|
||||||
, fUtf8String(NULL)
|
, fUtf8String(NULL)
|
||||||
{
|
{
|
||||||
SetTo(cs0, length);
|
SetTo(cs0, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
String::~String()
|
UdfString::~UdfString()
|
||||||
{
|
{
|
||||||
DEBUG_INIT("String");
|
DEBUG_INIT("String");
|
||||||
|
|
||||||
@@ -129,9 +128,9 @@ String::~String()
|
|||||||
/*! \brief Assignment from a Utf8 string.
|
/*! \brief Assignment from a Utf8 string.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
String::SetTo(const char *utf8)
|
UdfString::SetTo(const char *utf8)
|
||||||
{
|
{
|
||||||
DEBUG_INIT_ETC("String", ("utf8: `%s', strlen(utf8): %ld", utf8,
|
DEBUG_INIT_ETC("UdfString", ("utf8: `%s', strlen(utf8): %ld", utf8,
|
||||||
utf8 ? strlen(utf8) : 0));
|
utf8 ? strlen(utf8) : 0));
|
||||||
_Clear();
|
_Clear();
|
||||||
if (!utf8) {
|
if (!utf8) {
|
||||||
@@ -221,9 +220,9 @@ String::SetTo(const char *utf8)
|
|||||||
/*! \brief Assignment from a Cs0 string.
|
/*! \brief Assignment from a Cs0 string.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
String::SetTo(const char *cs0, uint32 length)
|
UdfString::SetTo(const char *cs0, uint32 length)
|
||||||
{
|
{
|
||||||
DEBUG_INIT_ETC("String", ("cs0: %p, length: %ld", cs0, length));
|
DEBUG_INIT_ETC("UdfString", ("cs0: %p, length: %ld", cs0, length));
|
||||||
|
|
||||||
_Clear();
|
_Clear();
|
||||||
if (length == 0)
|
if (length == 0)
|
||||||
@@ -301,9 +300,9 @@ String::SetTo(const char *cs0, uint32 length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
String::_Clear()
|
UdfString::_Clear()
|
||||||
{
|
{
|
||||||
DEBUG_INIT("String");
|
DEBUG_INIT("UdfString");
|
||||||
|
|
||||||
delete [] fCs0String;
|
delete [] fCs0String;
|
||||||
fCs0String = NULL;
|
fCs0String = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user