Difference between revisions of "EXPLODE()"

From Lianjapedia
Jump to: navigation, search
(Example)
 
Line 13: Line 13:
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
menu fields select "+"
+
open database southwind
aMenu = explode("+", menuitem())
+
use customers
backtostring = implode("+", aMenu)
+
aFldlist = explode(",", fldlist())
 +
cFldlist = implode(",", aFldlist)
 
</code>
 
</code>
  

Latest revision as of 06:44, 10 May 2019

Purpose

Function to separate a string into the elements of an array

Syntax

EXPLODE(<expC1>, <expC2>)

See Also

AADD(), AAVERAGE(), ACOPY(), ADEL(), ADESC(), ADIR(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, ARRAY(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, GATHER, IMPLODE(), IN_ARRAY(), LOCAL, PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER

Description

The EXPLODE() function returns an array, having separated the string. <expC2>, into individual elements of the array. The character string, <expC1>, is used as the string separator.

Example

open database southwind
use customers
aFldlist = explode(",", fldlist())
cFldlist = implode(",", aFldlist)