cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Splitting the string into two strings

Former Member
0 Likes
419

Hi,

I am getting one string like 123/456, I need to split the string at '/' and pass 123 to one target and 456 to another. Is there any function to achieve this requirement please let me know...

Basha

View Entire Topic
Former Member
0 Likes

Hi,

Try this udf it works for your requirement..

String nm = "000012304/abc";

String search = "/";

String result = "";

String res = "";

int i;

i=nm.indexOf(search);

result = nm.substring(0,i);

res = nm.substring(i+1);

here nm is the input number you will be getting, search where "/" occurs and using substring read the first half and second half

regards,

Kishore