TVecByte::StringsToValues Method

Overload List

#SignatureDescription
1void StringsToValues(tStrings *srcList);Convert strings in srcList to integers.
2TVecInt *StringsToValues(tStrings *srcList, int ListIndex, int Index = 0, int Len = MtxVecEOA);Convert strings in srcList to integers starting at ListIndex.
3TVecInt *StringsToValues(const DewArray<DewString> &aList);
4TVecInt *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.

#NameTypeDescription
1srcListtStrings *
Remarks:

Convert strings in srcList to integers according to the IntPrecision property and store them in the Values array of the calling vector. The TVecByte::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: TVecByte::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.

#NameTypeDescription
1srcListtStrings *
2ListIndexint
3Index = 0int
4Len = MtxVecEOAint
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);

#NameTypeDescription
1aListconst 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);

#NameTypeDescription
1aListconst DewArray<DewString> &
2ListIndexint
3Index = 0int
4Len = MtxVecEOAint
Declared in Dew::Math::TVecInt · Dew.Math/MtxVecInt.h · Cross-compiler