Skip to content

CArrayString

CArrayString

CArrayString class is a class of dynamic array of string variables.

Description

The CArrayString class provides the ability to work with a dynamic array of string variables. The class allows adding/inserting/deleting array elements, performing an array sorting, and searching in a sorted array. In addition, methods of working with files have been implemented.

Declaration

class CArrayString : public CArray

Title

#include <Arrays\ArrayString.mqh>

Inheritance hierarchy

CObject

CArray

CArrayString

Class Methods by Groups

Memory control
ReserveAllocates memory to increase the size of the array
ResizeSets a new (smaller) size of the array
ShutdownClears the array with a full memory release
Add methods
AddAdds an element to the end of the array
AddArrayAdds elements of one array to the end of another
AddArrayAdds elements of one array to the end of another
InsertInserts an element to the specified position in the array
InsertArrayInserts to an array elements from another array from the specified position
InsertArrayInserts to an array elements from another array from the specified position
AssignArrayCopies the elements of one array to another
AssignArrayCopies the elements of one array to another
Update methods
UpdateChanges the element at the specified position array
ShiftMoves an item from a given position in the array to the specified offset
Delete methods
DeleteRemoves the element from the specified array position
DeleteRangeDeletes a group of elements from the specified array position
Access methods
AtGets the element from the specified array position
Compare methods
CompareArrayCompares the array with another one
CompareArrayCompares the array with another one
Sorted array opetations
InsertSortInserts an element in a sorted array
SearchSearches for an element equal to the sample in the sorted array
SearchGreatSearches for an element with a value exceeding the value of the sample in the sorted array
SearchLessSearches for an element with a value less than the value of the sample in the sorted array
SearchGreatOrEqualSearches for an element with a value greater than or equal to the value of the sample in the sorted array
SearchLessOrEqualSearches for an element with a value less than or equal to the value of the sample in the sorted array
SearchFirstSearches for the first element equal to the sample in the sorted array
SearchLastSearches for the last element equal to the sample in the sorted array
SearchLinearSearches for the element equal to the sample in the array
Input/output
virtual SaveSaves data array in the file
virtual LoadLoads data array from the file
virtual TypeGets the type identifier of the array

Methods inherited from class CArray

: Step, Step, Total, Available, Max, IsSorted, SortMode, Clear, Sort

Last updated on