|
|
|
|
StringToArray (Function) In french: ChaîneVersTableau Fills a one- or two-dimensional array of the specified type with the character string passed as parameter. The array is cleared before it is filled.
// One-dimensional array sMyValues is string = "AT" + CR + "B" + CR + "C" + CR + "D" + CR + "D" // Initial array MyArray is array of 3 strings StringToArray(sMyValues, MyArray) // The array contains: "A" , "B" , "C" , "D" , "D"
// One-dimensional array sString is string = "A" + CR + "B" + ";" + "C" + CR + "D" + "," + E + CR + "F" // Initial array MyArray is array of 6 strings StringToArray(sString, MyArray, [CR, ";", ","]) // The array contains: "A" , "B" , "C" , "D" , "E" , "F"
// Two-dimensional array sMyValues is string = "AT" + TAB + "B" + CR + "C" +TAB + "D" + CR + "E" + TAB + "F" // Initial array MyArray is array of 2 by 3 strings StringToArray(sMyValues, MyArray) // The array contains: "A;B" , "C;D" , "E;F"
// Two-dimensional array sString is string = "A" + TAB + "B" + CR + "C" + "/" + "D" + "*" + E + "\" + "F" // Initial array MyArray is array of 2 by 3 strings StringToArray(sString, MyArray, [CR, "*"], [TAB, "/", "\"]) // The array contains: "A;B" , "C;D" , "E;F"
Syntax
One-dimensional array Hide the details
StringToArray(<String> , <Array name> [, <Element separator>])
Two-dimensional array Hide the details
StringToArray(<String> , <Array name> [, <Row separator> [, <Column separator>]])
Remarks - The dimension of the array will be modified if necessary: rows and columns may be added according to the values found in <String>.
- The structure arrays supported are the one-dimensional arrays only.
- The arrays containing UNICODE strings or variants are not supported.
- For the Duration type, the value must be given in thousands of a second. The value 0 is not valid. You must use "0000000000".
Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|