java - Turning wsdl result into a multiple line list -
in programming class have been assigned task results wsdl , seperate results list. example,
children & family;children;family;friends
the task seperate line @ every ";" , input information on next line, transforms line list, such as..
children & family
children
family
friends
how got doing this? i've been stuck quite awhile.
this in java way
say string wsdlstring
input , result of method should arraylist<string>
:
public arraylist<string> seperateintolist(string wsdlstring){ string[] resultarray = wsdlstring.split(";"); arraylist<string> resultlist = new arraylist<string>(resultarray.size()); for(string listitem: resultarray) { resultlist.add(listitem); } return resultlist; }
i wasn't quite sure, if want string linebreaks instead of list
can use wsdlstring.replace(";","\n");
Comments
Post a Comment