Skip to main content
InSource KnowledgeCenter

TN Appsvr107 ArchestrA String Manipulation Using the "Split" function

HOWTOSMALL.jpg
HOW TO

Description

 

Using the "Split" function to separate strings based on a # of separators inside an ArchestrA script.

Author

Joseph Hefner

Publish Date

8/22/2014

 

Applies to Software

Application Server

Applies to Version

3.1 or greater

Applies to System/Module

 

Article Version

01.01.01

************************************************************************************************************************************************************

 

The following script is an example of how the .net string function "split" can be used in the ArchestrA scripting environment to split a string and allow action to be take on the result:

 

Capture5.JPG

 

The script above can be copied from below if desired:

 

Dim value as System.string;
dim words[9] as System.string;
dim separators[1] as System.string;
dim s as System.string;

separators[1] = ",";


value = "403149,1149696,4kk-INT#47,2014/08/12@06:21:13,60,54332A,0,00000,17";

words = value.Split(separators, System.StringSplitOptions.RemoveEmptyEntries);

for each s in words[]
  logmessage (s);
next;