Looping on String split
Summary:
Hi, I am trying to achieve the following java logic in Oracle Integration Cloud. Basically I am getting comma separated string as input. I want to split the string(Test1,Test2,Test3) based on the comma, iterate it, and in the loop send each split string (ex:test1) to the external REST service as input.
public class MyClass {
public static void main(String args[]) {
String vInputIntgs = "Test1,Test2,Test3";
String comma = ","; // To search ',' from the first occurrence of the specified string
int start = 0, end;
end = vInputIntgs.indexOf(comma, start);
System.out.println(end);
while (end != -1) {
String split = vInputIntgs.substring(start, end);
Tagged:
0