Showing results for 
Search instead for 
Did you mean: 
Reply

Converting a delimited string to a string array

Solved!
Go to Solution

Converting a delimited string to a string array

I have a string:

(no quotes)

 

"Aout,B,Cin,D,Etest".

 

I want to convert this into a 1D array of 

 

Aout

B

Cin

D

Etest

 

I could not find a VI that does that. Best way to do this ?

0 Kudos
Message 1 of 10 (2,795 Views)
Reply
0 Kudos

Re: Converting a delimited string to a string array

The string to array function will do that.

 

Use a comma as the delimimter and a 1d-array as the data-type.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 10 (2,794 Views)
Reply
0 Kudos

Re: Converting a delimited string to a string array

Thanks for the quick response.

 

I tried using the Spreadsheet string to array function, with the comma as the delimiter and %s as the format (as the documentation says). The input numeric double array (2D) is unwired. However, the output is still a double (orange) and wiring it to the search 1D array VI expecting a string array input produces a bad wire.

 

Am I using the wrong VI ?

0 Kudos
Message 3 of 10 (2,786 Views)
Reply
0 Kudos

Re: Converting a delimited string to a string array

Simply wire an empty 1D string array to the 'array type input'.

0 Kudos
Message 4 of 10 (2,781 Views)
Reply
0 Kudos
Solution
Accepted by topic author m-s
‎08-27-2015 06:09 PM

Re: Converting a delimited string to a string array

Had to wire a constant string array to the array type. Works now.

 

Thanks.

0 Kudos
Message 5 of 10 (2,775 Views)
Reply
0 Kudos

Re: Converting a delimited string to a string array

Then please mark Dennis' message as the solution to your question instead of your own message since he was the one who gave you the solution.

 

You can unmark yours by going to the option menu to the upper right of your message.

0 Kudos
Message 6 of 10 (2,764 Views)
Reply
0 Kudos

Re: Converting a delimited string to a string array

Please start a new thread rather than appending to a three year old thread which is marked as Solved.

 

When you do so, please be more specific. Your brief statement does not tell us much about the string, how many segments to split, or anythng else. You did not actually ask a question.

 

Lynn

0 Kudos
Message 7 of 10 (1,418 Views)
Reply
0 Kudos

Re: Converting a delimited string to a string array

[ Edited ]

You have to remember that this comes from a generation where they think that "That awkward feeling when you realize you can't write a complete sentence." is a complete sentence.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 8 of 10 (1,397 Views)

Re: Converting a delimited string to a string array

9 posts all to old threads, no value added, weird link for JAVA help in the signature...screams SPAM to me.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

The discussions from the Advanced User Track is not over. Join in the conversation: 2016 Advanced Users Track
NI-Week attendees, click here to take the survey for the sessions you have attended!
0 Kudos
Message 9 of 10 (1,377 Views)
Reply
0 Kudos

Re: Converting a delimited string to a string array


crossrulz wrote:

9 posts all to old threads, no value added, weird link for JAVA help in the signature...screams SPAM to me.


I didn't see the little link at the bottom.  Shows how effective the SPAM was.  I'm surprised that there wasn't ten other old threads that resurfaced also...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 10 (1,363 Views)
Reply
0 Kudos