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