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
I would like to convert this nonwhitespace stringhex into a binary
so at the end I would get something like:
thank you
0 Kudos
Message 1 of 6

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. 


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

DNatt, LV R&D
Message 2 of 6
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

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

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. Smiley Wink


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 5 of 6
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...

0 Kudos
Message 6 of 6