09-15-2021 01:25 PM
Was trying to get rid of whitespace in this expression "LOC "
Thought I had a whitespace at the end, or a tab. Tried deleting both and could not get it to go away.
Switched to codes display and got \00. What is this?
Thanks.
09-15-2021 01:46 PM
/00 is "null", or 0x00 in hex. You generally cannot type this with a normal keyboard in normal operation.
See code 0x00 here:
Basically, switch to /codes display, then you can delete it and then switch back.
How'd you get it in there anyway? Was it a string sent from another program or device? The reason I ask is because in some languages, strings are defined in memory as a "start" memory address, and the string is valid until it sees a Null character, or 0x00. These are called "null terminated" strings.
LabVIEW uses a different method, where it prepends the string length to the beginning of memory and doesn't need the null character to terminate the string. However, if you open a string from another program that DOES need the null terminator, you could wind up having a bunch of extra null characters in your string.
09-15-2021 01:48 PM - edited 09-15-2021 01:54 PM
@mshaske wrote:
Switched to codes display and got \00. What is this?
A NULL character. If you are interfacing with any C libraries, strings will be terminated with a NULL character. You can get rid of it with a Match Pattern.
09-15-2021 07:09 PM
You can use the "Printable?" function from the Comparison palette in LabVIEW to parse a string to more aggressively filter out characters like this, since the standard "Trim Whitespace" just looks for tab/linefeed/return/space. That way it's a general way to trim anything, instead of a search specifically for "\00".