ONLINE HELP WINDEV, WEBDEV AND WINDEV MOBILEVersion: 2425262728
 WINDEV WEBDEV WINDEV Mobile Others 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.Example // One-dimensional arraysMyValues is string = "AT" + CR + "B" + CR + "C" + CR + "D" + CR + "D"// Initial arrayMyArray is array of 3 stringsStringToArray(sMyValues, MyArray)// The array contains: "A" , "B" , "C" , "D" , "D" // One-dimensional arraysString is string = "A" + CR + "B" + ";" + "C" + CR + "D" + "," + E + CR + "F"// Initial arrayMyArray is array of 6 stringsStringToArray(sString, MyArray, [CR, ";", ","]) // The array contains: "A" , "B" , "C" , "D" , "E" , "F" // Two-dimensional arraysMyValues is string = "AT" + TAB + "B" + CR + "C" +TAB + "D" + CR + "E" + TAB + "F"// Initial arrayMyArray is array of 2 by 3 stringsStringToArray(sMyValues, MyArray)// The array contains: "A;B" , "C;D" , "E;F" // Two-dimensional arraysString is string = "A" + TAB + "B" + CR + "C" + "/" + "D" + "*" + E + "\" + "F" // Initial array    MyArray is array of 2 by 3 stringsStringToArray(sString, MyArray, [CR, "*"], [TAB, "/", "\"]) // The array contains: "A;B" , "C;D" , "E;F" Syntax One-dimensional array StringToArray( , [, ]) : Character stringContains the different array elements. The string will be cut according to the specified element separator.If this parameter corresponds to an empty string (""), the dimension of the array is set to one dimension and a single row. : Array variableName of the one-dimensional array into which the elements found in the string must be added. This array must be allocated in a simple type or in a structure type. : Optional string or ArraySeparator used in to separate the values of the different array elements. This separator can be: a string (e.g.: ";").an array of strings (e.g.: [CR,";"]). Not available. The element separator used by default is the CR character (Carriage Return). Two-dimensional array StringToArray( , [,  [, ]]) : Character stringContains the different array elements. The string will be cut according to the specified row separator, then according to the column separator. The elements will be added row by row. There will be as many rows as the number of . Columns will be added if the maximum number of exceeds the number of columns in the array. Each column must have a corresponding value for the row. The number of result array columns is the number of elements in the first row.If a row contains more elements than the first row, the extra elements will be concatenated in the last element. If a row contains less elements than the first row, the non-assigned array cells keep their default value.If this parameter corresponds to an empty string (""), the dimension of the array is set to one dimension and a single row. : Array variableName of the two-dimensional array where the elements found in the string must be added. This array must be allocated in a simple type or in a structure type. : Optional string or ArraySeparator used in to separate the values of the different rows. This separator can be: a string (e.g.: ";").an array of strings (e.g.: [CR,"*"]). Not available. The row separator used by default is the CR character (Carriage Return). : Optional string or ArraySeparator used in the to separate the values of the different columns. This separator can be: a string (e.g.: "TAB").an array of strings (e.g.: ["/", "\"]). Not available. The column separator used by default is TAB. Remarks The dimension of the array will be modified if necessary: rows and columns may be added according to the values found in .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 codeComponent: wd280vm.dll Minimum version required Version 12 This page is also available for…
 Comments
 Example
 ArrPaises is array of stringsListaPaisesTxt is string = [FrançaBrasilEstados Unidos]StringToArray(ListaPaisesTxt, ArrPaises , CR)//C'est magnifique !!!!!
 BOLLER
 15 Feb. 2020
 Send a report | Local help