LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

remove space

does anybody know how to remove whitespace in the middle of the string?
for example:
1A 3F 2C
become
1A3F2C
 
I would like to convert this nonwhitespace stringhex into a binary
so at the end I would get something like:
000110100011111100101100
thank you
 
-bm-
 
0 Kudos
Message 1 of 6
(2,830 Views)

Have you tried the Search and Replace String function?  Your search string would be a space, and your replace string would be an empty string, and you would set the "replace all" option to True. 

-D

Message Edited by Darren on 01-30-2006 04:31 PM

Message 2 of 6
(2,825 Views)
The Search and Replace String function works well, but I want to know how to reformat the string.

From this:    B1 E0 14 A7

To this:  B1E0 14A7

Basically remove the 3 spaces and group into 4 character hex sets with space in between.

Any Thoughts?
0 Kudos
Message 3 of 6
(2,729 Views)

Here's one way. I'm sure there are many others.

Message Edited by Dennis Knutson on 01-10-2007 03:58 PM

0 Kudos
Message 4 of 6
(2,721 Views)

I am a bit confused why you are so worried about the hex format, if all you want at the end is a binary formatted string.

You could just scan whetver the current format is, then reformat it as binary. If you want an indicator containing the space every 4 hex characters, just convert it to a binary string and set the string display to hex format. 😉

 

0 Kudos
Message 5 of 6
(2,709 Views)
I thought of accomplishing the task using the bit by bit method, and masking off the portions I need to work with.  Instead I used the above formatting ideas from Dennis, to accomplish exactly what I wanted to do...

thanks,
0 Kudos
Message 6 of 6
(2,692 Views)