hi to all. I have a problem i finding substring.
i have many strings in array
one string as the value String s1="a|b"
2nd as the value String s2= "ab|cd"
3rd as the value String s3= "a|cde"
i want to extract or substring these string values as two strings which is seprated by '|'.
for eg 1st is substring as a and b
2nd is ab and cd
3rd is a and cde.
i know only this way to find
s1.substring(0, 1);
s1.substring(2, 3);
insteading of giving starting and ending position it want to take upto that symbol '|'
i have many strings in array
one string as the value String s1="a|b"
2nd as the value String s2= "ab|cd"
3rd as the value String s3= "a|cde"
i want to extract or substring these string values as two strings which is seprated by '|'.
for eg 1st is substring as a and b
2nd is ab and cd
3rd is a and cde.
i know only this way to find
s1.substring(0, 1);
s1.substring(2, 3);
insteading of giving starting and ending position it want to take upto that symbol '|'
Comment