Bug 315438 - Want nsTAString const char_type* BeginWriting() const; signature r=darin

git-svn-id: svn://10.0.0.236/trunk@184295 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bsmedberg%covad.net
2005-11-08 14:16:16 +00:00
parent 8bcea0eae2
commit b3deca975e

View File

@@ -156,6 +156,20 @@ class nsTAString_CharT
return iter;
}
inline const char_type* BeginReading() const
{
const char_type *b;
GetReadableBuffer(&b);
return b;
}
inline const char_type* EndReading() const
{
const char_type *b;
size_type len = GetReadableBuffer(&b);
return b + len;
}
/**
* BeginWriting/EndWriting can be used to get mutable access to the
@@ -180,6 +194,19 @@ class nsTAString_CharT
return iter;
}
inline char_type* BeginWriting()
{
char_type *b;
GetWritableBuffer(&b);
return b;
}
inline char_type* EndWriting()
{
char_type *b;
size_type len = GetWritableBuffer(&b);
return b + len;
}
/**
* Length checking functions. IsEmpty is a helper function to avoid