LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Breaking a string into parts

I have a case like this

 

aaaaa,bbbbb,ccccc,ddddd,

 

The a, b, c, and d values are not the same on each read, different lengths

 

I need to remove the 4 commas and split the 4 segments out seperatly to use as variables in an equation.

 

How can this be accomplished?

 

Thank you in advance.

0 Kudos
Message 1 of 9
(3,397 Views)

Use Spreadsheet String to Array.  Make the type a 1D array of whatever you data type you want (string, integer, floating point).  Set the delimiter to be a comma.  For the format, it depends on the data type you want.  For a string use %s, for an integer use %d, for a float use %f.


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
Message 2 of 9
(3,396 Views)

!0.png

try that baby


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 9
(3,375 Views)

That baby is a little too young for me...  😉

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 4 of 9
(3,363 Views)

Lots going on inside the 2012 version.  I guess it would save time versus strining all that stuff up...  🙂

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 5 of 9
(3,361 Views)

use scan from string with regex

Example_VI.png

0 Kudos
Message 6 of 9
(3,344 Views)

Hi, there is another way to accomplish by using Spreadsheet String to Array.

0 Kudos
Message 7 of 9
(3,338 Views)

@William1225 wrote:

Hi, there is another way to accomplish by using Spreadsheet String to Array.


this had already been mentioned...   Smiley Wink

0 Kudos
Message 8 of 9
(3,328 Views)

XD...I didn't notice it, sorry to my carelessness....

0 Kudos
Message 9 of 9
(3,324 Views)