LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting a delimited string to a string array

Solved!
Go to solution

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
(9,969 Views)

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
(9,968 Views)

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
(9,960 Views)

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

Message 4 of 10
(9,955 Views)
Solution
Accepted by m-s

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

 

Thanks.

0 Kudos
Message 5 of 10
(9,949 Views)

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
(9,938 Views)

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
(8,592 Views)

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
(8,571 Views)

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


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 10
(8,551 Views)

@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
(8,537 Views)