New String::append methods that join back an ObjList.
git-svn-id: http://yate.null.ro/svn/yate/trunk@1234 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
25f9f72297
commit
20e1728c4f
|
@ -661,6 +661,16 @@ String& String::append(const char* value, const char* separator, bool force)
|
|||
return *this;
|
||||
}
|
||||
|
||||
String& String::append(const ObjList* list, const char* separator, bool force)
|
||||
{
|
||||
for (; list; list = list->next()) {
|
||||
const GenObject* obj = list->get();
|
||||
if (obj)
|
||||
append(obj->toString().c_str(),separator,force);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
String& String::append(double value, unsigned int decimals)
|
||||
{
|
||||
if (decimals > 12)
|
||||
|
|
17
yateclass.h
17
yateclass.h
|
@ -1551,6 +1551,23 @@ public:
|
|||
*/
|
||||
String& append(const char* value, const char* separator = 0, bool force = false);
|
||||
|
||||
/**
|
||||
* List members appending with a separator
|
||||
* @param list Pointer to ObjList whose @ref GenObject::toString() of the items will be appended
|
||||
* @param separator Separator to insert before each item in list
|
||||
* @param force True to allow appending empty strings
|
||||
*/
|
||||
String& append(const ObjList* list, const char* separator = 0, bool force = false);
|
||||
|
||||
/**
|
||||
* List members appending with a separator
|
||||
* @param list Reference of ObjList whose @ref GenObject::toString() of the items will be appended
|
||||
* @param separator Separator to insert before each item in list
|
||||
* @param force True to allow appending empty strings
|
||||
*/
|
||||
inline String& append(const ObjList& list, const char* separator = 0, bool force = false)
|
||||
{ return append(&list,separator,force); }
|
||||
|
||||
/**
|
||||
* Explicit double append
|
||||
* @param value Value to append
|
||||
|
|
Loading…
Reference in New Issue