NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

remove characters from string

Solved!
Go to solution

I'm currently in the process of developing a seqence for barcode parsing , then writing specific data from the barcode to EE on the UUT.     Here's my issue:  One particular character sting from the barcode contains several "-" marks. The the raw barcode data is as follows "aaaa-bbbb-cccc-dddd-eeee".    However, to write the data to EE, I need the sting in the following format:  "aaaabbbbccccddddeeee".   Is it possible to use Testand to revome the any instance of "-" from the sting?

 

Thanks

0 Kudos
Message 1 of 6
(7,163 Views)

SearchAndReplace("aaaa-bbbb-cccc-dddd", "-", "", 0, False, -1, False)

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 6
(7,161 Views)
Solution
Accepted by topic author svacek

Here's one option:

 

SearchAndReplace(Locals.InputString,"-","")

0 Kudos
Message 3 of 6
(7,159 Views)

Perfect!  Thanks for the asistance.

0 Kudos
Message 4 of 6
(7,156 Views)

How can i remove a "tab" from a string? i've tries the search and replace function, but it is not working for me. 

0 Kudos
Message 5 of 6
(3,089 Views)

This worked for me: SearchAndReplace(Locals.VariableWithTabs, "\t", "")

 

It both modifies the variable and returns the modified value as the result of the function.

0 Kudos
Message 6 of 6
(3,086 Views)