System::Collections::Specialized::StringCollection class

StringCollection class

Indexed list of strings. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class StringCollection : public System::Collections::Generic::IEnumerable<System::String>

Nested classes

Methods

MethodDescription
Add(const System::String&)Adds value to the end of the list.
AddRange(const ArrayPtr<System::String>&)Add elements into container.
begin()Returns an iterator to the first element of the container. If the container is empty, the returned iterator will be equal to end().
begin() constReturns an iterator to the first element of the const-qualified container. If the container is empty, the returned iterator will be equal to end().
cbegin() constReturns an iterator to the first const-qualified element of the container. If the container is empty, the returned iterator will be equal to cend().
cend() constReturns an iterator to the element following the last element of the container. This element acts as a placeholder; attempting to access it results in undefined behavior.
Clear()Deletes all elements.
Contains(const System::String&) constChecks whether specific string is present in container.
CopyTo(const ArrayPtr<System::String>&, const int32_t) constCopy elements to existing arra elements.
crbegin() constReturns a reverse iterator to the first element of the reversed container. It corresponds to the last element of the non-reversed container. If the container is empty, the returned iterator is equal to crend().
crend() constReturns a reverse iterator to the element following the last element of the reversed container. It corresponds to the element preceding the first element of the non-reversed container. This element acts as a placeholder, attempting to access it results in undefined behavior.
data()Internal data structure accessor.
data() constInternal data structure accessor.
end()Returns an iterator to the element following the last element of the container. This element acts as a placeholder; attempting to access it results in undefined behavior.
end() constReturns an iterator to the element following the last element of the const-qualified container. This element acts as a placeholder; attempting to access it results in undefined behavior.
get_Count() constGets number of elements in collection.
GetEnumerator() overrideGets enumerator iterating through current collection.
idx_get(int) constGets value at specified position.
idx_set(int, const System::String&)Sets value at specified position.
IndexOf(const System::String&) constLooks for specific string in container.
Insert(int, const System::String&)Inserts specific value into container.
operator[](int)Accessor function.
rbegin()Returns a reverse iterator to the first element of the reversed container. It corresponds to the last element of the non-reversed container. If the container is empty, the returned iterator is equal to rend().
rbegin() constReturns a reverse iterator to the first element of the reversed container. It corresponds to the last element of the non-reversed container. If the container is empty, the returned iterator is equal to rend().
Remove(const System::String&)Removes first occurrence of specified string.
RemoveAt(int)Removes element at specified position.
rend()Returns a reverse iterator to the element following the last element of the reversed container. It corresponds to the element preceding the first element of the non-reversed container. This element acts as a placeholder, attempting to access it results in undefined behavior.
rend() constReturns a reverse iterator to the element following the last element of the reversed container. It corresponds to the element preceding the first element of the non-reversed container. This element acts as a placeholder, attempting to access it results in undefined behavior.
StringCollection()Constructs empty string collection.
virtualizeBeginConstIterator() const overrideGets the implementation of begin const iterator for the current container.
virtualizeBeginIterator() overrideGets the implementation of begin iterator for the current container.
virtualizeEndConstIterator() const overrideGets the implementation of end const iterator for the current container.
virtualizeEndIterator() overrideGets the implementation of end iterator for the current container.

Typedefs

TypedefDescription
iteratorIterator type.
const_iteratorConst iterator type.
reverse_iteratorReverse iterator type.
const_reverse_iteratorConst reverse iterator type.

See Also