LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

select from string?

Solved!
Go to solution

i have string like #456,123 and want to select (4)[as the second digit not more] to add it with other no.
what shall i do?

0 Kudos
Message 1 of 5
(2,368 Views)

This is an extremely basic task for LabVIEW.

 

Have you even gone through the tutorials????

http://www.ni.com/academic/students/learnlabview/

0 Kudos
Message 2 of 5
(2,366 Views)

how i can do it 

Spoiler
 
0 Kudos
Message 3 of 5
(2,360 Views)
Solution
Accepted by topic author oiuuhjoi

Do what? What do you mean by "add it with the other no"? Do you mean you want to mathematically add the 4 and the 5 to get 9 or perform string concatenation to get '45'? Do you want to add the 4 and the 56,123?

 

To select a subset of a string you can use the String Subset function. There is a zero based index input and a length. Index 0 would be the # and index 1 is the 4. There is also a length input which defaults to the rest of the string. Wire a 1 to that.

=====================
LabVIEW 2012


Message 4 of 5
(2,352 Views)

You a regular expression. The expression "#(\d)" would isolate the first digit after the pound sign.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 5 of 5
(2,348 Views)