CharArray struct | QSYS API Reference Guide
Estimated reading time: 2 minutes
Represents a unidimensional fixed-size array of characters.
Namespace: ASNA.QSys.Runtime Assembly: ASNA.QSys.Runtime.dll
Constructors
Name | Description |
---|---|
CharArray(Char[]) | Initializes a CharArray out of an array of char elements. |
CharArray(Char[])
Initializes a CharArray out of an array of char elements.
CharArray(Char[])
Parameters
Type | Parameter name | Description |
---|---|---|
Char[] | array | The array of char elements |
Properties
Type | Name | Description |
---|---|---|
Char[] | Array | Gets the array that holds the values of the CharArray. |
Char | Item | Indexer over the array, gets or sets the element at that position. |
Int32 | Length | Gets the number of elements in the CharArray. |
Methods
Signature | Description |
---|---|
Clear() | Clears all elements of the array to their default value. |
CopyFrom(Char[], Int32) | Copy elements of a char[] into this array, starting at the given position. |
GetEnumerator() | Get an IEnumerator to iterate over the elements of the array. |
Sort(Boolean, Int32, Int32) | Order elements of the array according to their value. |
void Clear()
Clears all elements of the array to their default value.
void Clear()
void CopyFrom(Char[] sourceArray, int targetStartAt)
Copy elements of a char[] into this array, starting at the given position.
void CopyFrom(Char[] sourceArray, int targetStartAt)
Parameters
Type | Parameter name | Description |
---|---|---|
Char[] | sourceArray | The array from where to copy. |
Int32 | targetStartAt | The starting index in this array. Default is 0. |
IEnumerator GetEnumerator()
Get an IEnumerator to iterate over the elements of the array.
IEnumerator<char> GetEnumerator()
void Sort(bool ascending, int start, int length)
Order elements of the array according to their value.
void Sort(bool ascending, int start, int length)
Parameters
Type | Parameter name | Description |
---|---|---|
Boolean | ascending | True for ascending order. Default is true. |
Int32 | start | Index of the element where the sort starts. Default is 0. |
Int32 | length | How many elements to sort. Default is -1, sort the whole array. |