IT Process Automation

CA PAM::. Working with array - How to use split command? 

Jan 05, 2017 11:37 AM

Definition and Usage

 

The split() method is used to split a string into an array of substrings, and returns the new array.

Tip: If an empty string ("") is used as the separator, the string is split between each character.

 

Note: The split() method does not change the original string.

 

 

Syntax:

string.split(separator, limit)

 

Parameter Values

 

ParameterDescription
separatorOptional. Specifies the character, or the regular expression, to use for splitting the string. If omitted, the entire string will be returned (an array with only one item)
limitOptional. An integer that specifies the number of splits, items after the split limit will not be included in the array

 

Example:

Process.a = new String([10, 205, 210, 250, 280, 300, 305, 310, 40]);

Process.E = Process.a.split(',');

Process.C = Process.E[1];

Process.D = 5 + ~~C;

By ElwynnMartin 

 

 

Load an array in particular sequence 

JavaScript String split() Method 

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.