TagLib API Documentation
Public Member Functions | Static Public Member Functions | Related Functions | List of all members
TagLib::StringList Class Reference

A list of strings. More...

#include <tstringlist.h>

Inheritance diagram for TagLib::StringList:
[legend]
Collaboration diagram for TagLib::StringList:
[legend]

Public Member Functions

 StringList ()
 
 StringList (const StringList &l)
 
 StringList (const String &s)
 
 StringList (const ByteVectorList &vl, String::Type t=String::Latin1)
 
virtual ~StringList ()
 
String toString (const String &separator=" ") const
 
StringListappend (const String &s)
 
StringListappend (const StringList &l)
 
- Public Member Functions inherited from TagLib::List< String >
 List ()
 
 List (const List< String > &l)
 
virtual ~List ()
 
Iterator begin ()
 
ConstIterator begin () const
 
Iterator end ()
 
ConstIterator end () const
 
Iterator insert (Iterator it, const String &value)
 
List< String > & sortedInsert (const String &value, bool unique=false)
 
List< String > & append (const String &item)
 
List< String > & append (const List< String > &l)
 
List< String > & prepend (const String &item)
 
List< String > & prepend (const List< String > &l)
 
List< String > & clear ()
 
unsigned int size () const
 
bool isEmpty () const
 
Iterator find (const String &value)
 
ConstIterator find (const String &value) const
 
bool contains (const String &value) const
 
Iterator erase (Iterator it)
 
const Stringfront () const
 
Stringfront ()
 
const Stringback () const
 
Stringback ()
 
void setAutoDelete (bool autoDelete)
 
Stringoperator[] (unsigned int i)
 
const Stringoperator[] (unsigned int i) const
 
List< String > & operator= (const List< String > &l)
 
void swap (List< String > &l)
 
bool operator== (const List< String > &l) const
 
bool operator!= (const List< String > &l) const
 

Static Public Member Functions

static StringList split (const String &s, const String &pattern)
 

Related Functions

(Note that these are not member functions.)

std::ostream TAGLIB_EXPORToperator<< (std::ostream &s, const TagLib::StringList &l)
 

Additional Inherited Members

- Protected Member Functions inherited from TagLib::List< String >
void detach ()
 

Detailed Description

A list of strings.

This is a specialization of the List class with some members convention for string operations.

Constructor & Destructor Documentation

◆ StringList() [1/4]

TagLib::StringList::StringList ( )

Constructs an empty StringList.

◆ StringList() [2/4]

TagLib::StringList::StringList ( const StringList l)

Make a shallow, implicitly shared, copy of l. Because this is implicitly shared, this method is lightweight and suitable for pass-by-value usage.

◆ StringList() [3/4]

TagLib::StringList::StringList ( const String s)

Constructs a StringList with s as a member.

◆ StringList() [4/4]

TagLib::StringList::StringList ( const ByteVectorList vl,
String::Type  t = String::Latin1 
)

Makes a deep copy of the data in vl.

Note
This should only be used with the 8-bit codecs Latin1 and UTF8, when used with other codecs it will simply print a warning and exit.

◆ ~StringList()

virtual TagLib::StringList::~StringList ( )
virtual

Destroys this StringList instance.

Member Function Documentation

◆ append() [1/2]

StringList& TagLib::StringList::append ( const String s)

Appends s to the end of the list and returns a reference to the list.

◆ append() [2/2]

StringList& TagLib::StringList::append ( const StringList l)

Appends all of the values in l to the end of the list and returns a reference to the list.

◆ split()

static StringList TagLib::StringList::split ( const String s,
const String pattern 
)
static

Splits the String s into several strings at pattern. This will not include the pattern in the returned strings.

◆ toString()

String TagLib::StringList::toString ( const String separator = " ") const

Concatenate the list of strings into one string separated by separator.

Friends And Related Function Documentation

◆ operator<<()

std::ostream TAGLIB_EXPORT & operator<< ( std::ostream &  s,
const TagLib::StringList l 
)
related

Send the StringList to an output stream.


The documentation for this class was generated from the following file: