I’ve split a string based on the space but how do I remove the last 2 elements? Able to remove the first element by just replacing (0) with “”. But stuck on the replacing the last 2
You can do this with a simple assign activity as follows: YourArray = YourArray.Take(YourArray.length - 2).ToArray
EDIT: You can expand this to also remove the first element of the array as follows: Assign YourArray = YourArray.Take(YourArray.length - 2).Skip(1).ToArray
The order of the Take/Skip is important, you’ll want to Take first, then Skip
Hi this part is confusing. Initially reading from pdf, the line is a string of text. e.g. “This event is on the Friday.” As I only want “Event is on”, hence I use .Split() so as to separate them into elements.But how do i string to array
As you said, you are splitting the text based on space right. It will generate output as array of string. And then use that expression @Dave mentioned in previous post.
Thanks !! i understood now
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.