Insert Space Between Each Byte of Hex String

Updated Apr 25, 2018

Reported In

Software

  • LabVIEW

Issue Details

I have a hex string with no spaces as an input and I would like to add a space between every byte or every two characters. How can I do this in LabVIEW?

Solution

You can achieve this by using the String Functions. Two common ways are listed below:
  1. By using a loop that will create a substring, using the String Subset Function, of each byte and concatenate them together with the spaces.
  2. Or by using regular expressions with the Search and Replace String function.
Examples of this can be found in this forum post.

WAS THIS ARTICLE HELPFUL?

Not Helpful