07-10-2010 05:03 AM
hi,
is there a simple way to remove blank spaces from a 1d string
eg:-
help forum is awesome -to- helpforumisawesome
many thanks for your ongoing help.
07-10-2010 05:45 AM
found the 'search and replace subset string' VI but using a space as the scan string and an empty sting as the replace, it seems to do nothing to the input. help!
07-10-2010 05:47 AM
Hi John,
can you show what you have done? Do you mean a 1D Array of strings?
Mike
07-10-2010 06:00 AM
rather oddly i can't the computer i use isn't on the web and this computer doesn't have LV on it.
I'm using a 1D string, looking through it for spaces and trying to replace any space with nothing
turning say:-
thank you for your reply
into
thankyouforyourreply
I thought using the above vi might work, but it doesn't seem to want to accept a blank string constant as something to search for, it works for any other letter happily.
07-10-2010 07:16 AM
hi, sorry no i just mean a string, not a 1d array of strings.
07-10-2010 08:23 AM
The function you mention works just fine. Did you set the Boolean to replace all?
07-10-2010 08:41 AM
I did set it to replace all yes.
how did you put in the blank and space stings? right click-create constant-then type the contents or is there a cleaver way of doing it?
07-10-2010 08:46 AM
Creating a constant works that way for the space. You can use the empty string constant on the string palette. Are you sure you have a space in the string? Right click and select '\' Codes Display. A space will show as \s.
07-10-2010 08:51 AM
might be the empty sting constant constant I need, i'll give it a go when I get a min.
Thanks for your advise.
In 99% sure there is a space in there, typed it in over and over to be sure as when you type one character the constant holder got smaller
07-10-2010 09:11 AM
not sure if it matters but i'm on LV8.2