function returnParameter(value,splitString,indexString,type,count){
var output=value.split(splitString)
var index=output[count].indexOf(indexString);
if(type=='Name'){
var parameter=output[count].substring(0,index);
}
else{
var parameter=output[count].substring(index+1);
}
result=parameter
return result
}
Input:
(abc;a=b,";","=","Name",$loopCountString)
(abc;a=b,";","=","Value",$loopCountString)
output:
Name=a
value=b
here loopCountOfString = the count of ";" the string contains.
No comments:
Post a Comment