From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove dashes from a hex number?

Hi, I'm trying to remove dashes from a hex number. How do I do this? For example, I would have 

12-34-56-78-91 and turn it into 1234567891. Thanks 

0 Kudos
Message 1 of 2
(2,079 Views)

If both your input and output are strings, Search And Replace String on the String palette will do the trick.  Just ensure that the replace all? input is TRUE.

 

If you want the output as a number, use Scan From String on the output of the search & replace using %x as the format string to indicate a hexadecimal conversion.  If you want 10 hex digits as in your example, you'll need to use a 64 bit integer.

 

Andy

Message 2 of 2
(2,063 Views)