BStringList: Declare Join() const
This commit is contained in:
@@ -53,7 +53,8 @@ public:
|
|||||||
int32 CountStrings() const;
|
int32 CountStrings() const;
|
||||||
bool IsEmpty() const;
|
bool IsEmpty() const;
|
||||||
|
|
||||||
BString Join(const char* separator, int32 length = -1);
|
BString Join(const char* separator, int32 length = -1)
|
||||||
|
const;
|
||||||
|
|
||||||
// Iteration
|
// Iteration
|
||||||
void DoForEach(bool (*func)(const BString& string));
|
void DoForEach(bool (*func)(const BString& string));
|
||||||
@@ -77,7 +78,8 @@ private:
|
|||||||
void _IncrementRefCounts() const;
|
void _IncrementRefCounts() const;
|
||||||
void _DecrementRefCounts() const;
|
void _DecrementRefCounts() const;
|
||||||
|
|
||||||
BString _Join(const char* separator, int32 length);
|
BString _Join(const char* separator, int32 length)
|
||||||
|
const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BList fStrings;
|
BList fStrings;
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ BStringList::IsEmpty() const
|
|||||||
|
|
||||||
|
|
||||||
BString
|
BString
|
||||||
BStringList::Join(const char* separator, int32 length)
|
BStringList::Join(const char* separator, int32 length) const
|
||||||
{
|
{
|
||||||
return _Join(separator,
|
return _Join(separator,
|
||||||
length >= 0 ? strnlen(separator, length) : strlen(separator));
|
length >= 0 ? strnlen(separator, length) : strlen(separator));
|
||||||
@@ -434,7 +434,7 @@ BStringList::_DecrementRefCounts() const
|
|||||||
|
|
||||||
|
|
||||||
BString
|
BString
|
||||||
BStringList::_Join(const char* separator, int32 length)
|
BStringList::_Join(const char* separator, int32 length) const
|
||||||
{
|
{
|
||||||
// handle simple cases (0 or 1 element)
|
// handle simple cases (0 or 1 element)
|
||||||
int32 count = CountStrings();
|
int32 count = CountStrings();
|
||||||
|
|||||||
Reference in New Issue
Block a user