Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void StringsToValues(tStrings *srcList); | Convert strings in srcList to integers. |
| 2 | TVecInt *StringsToValues(tStrings *srcList, int ListIndex, int Index = 0, int Len = MtxVecEOA); | Convert strings in srcList to integers starting at ListIndex. |
| 3 | TVecInt *StringsToValues(const DewArray<DewString> &aList); | |
| 4 | TVecInt *StringsToValues(const DewArray<DewString> &aList, int ListIndex, int Index = 0, int Len = MtxVecEOA); |
Overload 1: void StringsToValues(tStrings *srcList);
Convert strings in srcList to integers.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | srcList | tStrings * |
Remarks:
Convert strings in srcList to integers according to the IntPrecision property and store them in the Values array of the calling vector. The TVecSmallInt::Length of the calling vector is set to srcList.Count.
Examples
#include "MtxVecInt.h"
#include "Units.MtxVecInt.h"
#include "MtxStrings.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVecInt;
void Example()
{
TVecInt *a, *b;
tStringList* Lines;
CreateIt(a, b);
Lines = new tStringList();
a->SetIt(DewArray<int>{1,2,3,4});
a->Add(1);
b->Size(a);
b->SetVal(1);
a->Add(b);
Lines->Clear();
a->ValuesToStrings(Lines);
b->ValuesToStrings(Lines);
Lines->SaveToFile("Test.txt");
Lines->LoadFromFile("Test.txt");
a->StringsToValues(Lines);
delete Lines;
FreeIt(a, b);
}
See Also: TVecSmallInt::ValuesToStrings
Declared in Dew::Math::TVecInt · Dew.Math/MtxVecInt.h · Cross-compiler
Overload 2: TVecInt *StringsToValues(tStrings *srcList, int ListIndex, int Index = 0, int Len = MtxVecEOA);
Convert strings in srcList to integers starting at ListIndex.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | srcList | tStrings * | |
| 2 | ListIndex | int | |
| 3 | Index = 0 | int | |
| 4 | Len = MtxVecEOA | int |
Remarks:
Store them in the Values array of the calling vector from Index to Index+Len-1. The Length property of the calling vector is not changed. If array bounds are overrun and exception is raised.
Declared in Dew::Math::TVecInt · Dew.Math/MtxVecInt.h · Cross-compiler
Overload 3: TVecInt *StringsToValues(const DewArray<DewString> &aList);
| # | Name | Type | Description |
|---|---|---|---|
| 1 | aList | const DewArray<DewString> & |
Declared in Dew::Math::TVecInt · Dew.Math/MtxVecInt.h · Cross-compiler
Overload 4: TVecInt *StringsToValues(const DewArray<DewString> &aList, int ListIndex, int Index = 0, int Len = MtxVecEOA);
| # | Name | Type | Description |
|---|---|---|---|
| 1 | aList | const DewArray<DewString> & | |
| 2 | ListIndex | int | |
| 3 | Index = 0 | int | |
| 4 | Len = MtxVecEOA | int |
Declared in Dew::Math::TVecInt · Dew.Math/MtxVecInt.h · Cross-compiler