How would you take a input from a user and change it into an array

I want a user to paste a list of ID’s I then want to put them into an array the iterate over them with a foreach loop.

inputD.xaml (6.7 KB)

@vvaidya what to do if the input have blank/ empty space???
eg - 77654 , 65433 , 6655

We can split them like this
arr_strings = Split(str_input,”,”,StringSplitOptions.RemoveEmptyEntries)
Any whole mention the index for those elements in the array use .Trim to remove the blank spaces

Cheers @indrajit.shah

1 Like

nope it didn’t worked, instead of iterating on by one its giving the output as one string

for example i am entering - Indrajit, Indrajit Kumar, Indrajit Kumar Shah it must be treated as 3 strings where as its now treating as one string which is not correct per my requirement.

My concern is to iterate comma separated strings/input one by one and remove any blank space, if any in starting and in the end of the input