Functions Utility

StringToArray

The StringToArray() function is used to return a range of values (an array) by splitting a string into rows and columns denoted by delimiters. The delimiters can be a sequence of one or more characters.

Related functions: ArrayToString, SubstituteArray, TransposeArray

Syntax


StringToArray (Range, RowDelimiter, ColumnDelimiter)

Range The input string
RowDelimiter The character sequence that marks the beginning of a row in the input string
ColumnDelimiter The character sequence that marks the beginning of a column in the input string

Note:

Input parameters can consist of Quintessence functions. This includes functions that return ranges in cases where a parameter value can be a range.

Examples


Example 1. Splitting a string using ‘;’ as a row delimiter and ‘,’ as a column delimiter

Example 2. Splitting a string using ‘===’ as a row delimiter and ‘++’ as a column delimiter

Note:

How your system administrator configured Quintessence determines which function parameters are required. In most implementations, administrators configure functions so that certain parameters default to specific values when left blank.

Example 1. Splitting a string using ‘;’ as a row delimiter and ‘,’ as a column delimiter


The StringtoArray() function is used to split a string into an array. This example uses a semicolon as a row delimiter and a comma as a column delimiter.

Input string Split the string
Code,Date,Value;BSF,2015-03-31,65.36;BSF,2015-04-01,66.3;BSF,2015-04-02,67.2 =StringToArray(A2,”;”,”,”)
Input string Output
Code,Date,Value;BSF,2015-03-31,65.36;BSF,2015-04-01,66.3;BSF,2015-04-02,67.2 Code Date Value
BSF 2015-03-31 65.36
BSF 2015-04-01 66.3
BSF 2015-04-02 67.2

Example 2. Splitting a string using ‘===’ as a row delimiter and ‘++’ as a column delimiter


The StringtoArray() function is used to split a string into an array. This example uses three equal signs as a row delimiter and two plus signs as a column delimiter.

Input string Split the string
Code++Date++Value===BSF++2015-03-31++65.36===BSF++2015-04-01++66.3===BSF++2015-04-02++67.2 =StringToArray(A2,”===”,”++”)
Input string Output
Code++Date++Value===BSF++2015-03-31++65.36===BSF++2015-04-01++66.3===BSF++2015-04-02++67.2 Code Date Value
BSF 2015-03-31 65.36
BSF 2015-04-01 66.3
BSF 2015-04-02 67.2