PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
StringToArray (Function)
In French: ChaîneVersTableau
Fills a one- or two-dimensional array of the specified type with the character string passed in parameter. The array is cleared before it is filled.
Versions 15 and later
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
New in version 15
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// 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"
// 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"
Syntax

One-dimensional array Hide the details

StringToArray(<String> , <Array Name> [, <Element Separator>])
<String>: Character string (with quotes)
Contains 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 Name>: Array variable
Name 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.
<Element Separator>: Optional character string (with quotes)
Separator used in <String> to separate the values of the different array elements. The element separator used by default is the CR character (Carriage Return).

Two-dimensional array Hide the details

StringToArray(<String> , <Array Name> [, <Row Separator> [, <Column Separator>]])
<String>: Character string (with quotes)
Contains 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 <Row Separator>. Columns will be added if the maximum number of <Column Separator> 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 Name>: Array variable
Name 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.
<Row Separator>: Optional character string (with quotes)
Separator used in <String> to separate the values of the different rows. The row separator used by default is the CR character (Carriage Return).
<Column Separator>: Optional character string (with quotes)
Separator used in the <String> to separate the values of the different columns. 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 <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".
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment