May be this is useful for lot of persons while importing or exporting for splitting the string and get the string of the required position
private str strSplit(str _splitString,str _splitchar,int _pos)
{
List strlist=new List(Types::String);
ListIterator iterator;
container packedList;
;
strlist=strSplit(_splitString,_splitchar);
iterator = new ListIterator(strlist);
while(iterator.more())
{
packedList += iterator.value();
iterator.next();
}
return conPeek(packedList,_pos);
}
To call you can use like following
str strvalue="Test|Test2|Test3|Test4";
info(createProduct.strSplit(strvalue,"|",2));
Giving Error as StrSplit Function not defined!
ReplyDeletecreate the above function in global,may be globalclass already having this method, give your own name and add it into global
Delete