Split String function
Posted: Mon Sep 14, 2020 8:23 am
Anybody has a function to split string into array, based upon a split-character and length?
Example:
OR
The concatenated array should be the same as input string...
Serge
Example:
Code: Select all
xSTRING := 'This command is used to draw a rectangle from the specified location to a specified another location' // LEN=100
aRET := SPLITSTRING(xSTRING , 30, SPACE(1))
// OUTPUT SHOULD BE LIKE THIS....
? aRET [1] // This command is used to draw
? aRET [2] // a rectangle from the specified
? aRET [3] // location to a specified
? aRET [4] // another location
Code: Select all
xSTRING := 'This command is, used to draw a, rectangle from, the specified location, to a specified, another location' // LEN=100
aRET := SPLITSTRING(xSTRING , 30, ',')
// OUTPUT SHOULD BE LIKE THIS....
? aRET [1] // This command is,
? aRET [2] // used to draw a rectangle,
? aRET [3] // from, the specified location,
? aRET [4] // to a specified
? aRET [5] // another location
Serge