Jameo Core Library
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
jm::StringList Class Reference

This is a list of strings. It provides useful methods for manipulating string lists. More...

Inheritance diagram for jm::StringList:
jm::Object

Public Member Functions

 StringList ()
 Constructor for empty string list.
 
 StringList (size_t size)
 Constructor for empty string list with a given size. The elements are initialized to empty strings.
 
 StringList (const StringList &other)
 
 StringList (const jm::String &string)
 
 ~StringList () override
 
void reserve (size_t size)
 Reserve space for a given number of elements. The size of the list is not changed.
 
void append (const jm::String &string)
 
void remove (const jm::String &string)
 
size_t size () const
 
void sort ()
 
jm::String join (Char divider) const
 
const Stringget (size_t index) const
 
void set (size_t index, const String &item)
 
Stringoperator[] (const size_t index) const
 
StringListoperator= (const StringList &another)
 
void clear ()
 
bool contains (const String &str) const
 
Stringbegin ()
 
Stringend ()
 
- Public Member Functions inherited from jm::Object
 Object () noexcept
 Constructor.
 
virtual ~Object () noexcept
 Destructor.
 
void release () noexcept
 Decreases the reference counter and releases the object immediately when the reference counter becomes 0.
 
Objectretain () noexcept
 Increases the reference counter of this object by 1.
 
Objectautorelease () noexcept
 Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object.
 
int32 referenceCount () const noexcept
 Returns the value of the reference counter.
 
virtual bool equals (const Object *other) const
 Comparison of objects.
 
virtual String displayName () const
 Returns the display name of the object intended to present to a user.
 
virtual void printDiffInfo (DiffOperation operation, Object *other) const
 Output method for outputting the diff results for the diff algorithm.
 
void setHighBit (bool status) noexcept
 
bool highBit () const noexcept
 

Friends

DllExport friend StringListoperator<< (StringList &out, const String &str)
 

Detailed Description

This is a list of strings. It provides useful methods for manipulating string lists.

Author
Uwe Runtemund

Constructor & Destructor Documentation

◆ StringList() [1/4]

jm::StringList::StringList ( )

Constructor for empty string list.

◆ StringList() [2/4]

jm::StringList::StringList ( size_t  size)
explicit

Constructor for empty string list with a given size. The elements are initialized to empty strings.

Parameters
sizeThe size of the list.

◆ StringList() [3/4]

jm::StringList::StringList ( const StringList other)

◆ StringList() [4/4]

jm::StringList::StringList ( const jm::String string)
explicit

◆ ~StringList()

jm::StringList::~StringList ( )
override

Member Function Documentation

◆ append()

void jm::StringList::append ( const jm::String string)

◆ begin()

String * jm::StringList::begin ( )

◆ clear()

void jm::StringList::clear ( )

◆ contains()

bool jm::StringList::contains ( const String str) const

◆ end()

String * jm::StringList::end ( )

◆ get()

const String & jm::StringList::get ( size_t  index) const

◆ join()

jm::String jm::StringList::join ( Char  divider) const

◆ operator=()

StringList & jm::StringList::operator= ( const StringList another)

◆ operator[]()

String & jm::StringList::operator[] ( const size_t  index) const

◆ remove()

void jm::StringList::remove ( const jm::String string)

◆ reserve()

void jm::StringList::reserve ( size_t  size)

Reserve space for a given number of elements. The size of the list is not changed.

Parameters
sizeThe number of elements to reserve space for.

◆ set()

void jm::StringList::set ( size_t  index,
const String item 
)

◆ size()

size_t jm::StringList::size ( ) const

◆ sort()

void jm::StringList::sort ( )

Friends And Related Symbol Documentation

◆ operator<<

DllExport friend StringList & operator<< ( StringList out,
const String str 
)
friend