04-09-2020 09:03 AM
Hello, I have a string that contains different status information. These are separated by \n\r. Now I would like to transfer each status message into an array field. My solution works, but I find it very complicated. Does anyone have an idea to solve it more elegantly?
Thanks a lot for your help.
Best regards,
Michael
04-09-2020 09:13 AM - edited 04-09-2020 09:14 AM
04-09-2020 09:14 AM
04-09-2020 10:32 AM
04-09-2020 12:24 PM
@Yamaeda wrote:
I would have done this except leave the delimiter unwired (the EOL is handled already in the Spreadsheet String To Array). I have actually ran into this enough that I have a VI that does the FOR loop to eliminate empty strings in my arrays. I also have a similar one for NaN in floating point arrays.
04-09-2020 12:43 PM - edited 04-09-2020 12:49 PM
Remember that "scan string for tokens" (by default) collapses multiple consecutive delimiters into one, offering yet another simple solutions:
This simplifies things, because if does not matter if the delimiter is \n\r, \n, \r\n, \n\r\n\r, etc.
NOTE: Of course this is an an opportunity to remind people of my old idea:
Contract multiple delimiters for "Spreadsheet string to array"
Please vote for it! Thanks! 😄
04-09-2020 01:32 PM
If you have OpenG library, use it in the following way. Simple!