Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69434

How to get only the string out of a U8 array?

$
0
0

Good day!

 

In my logic, which is different to what LabVIEW does, a string doesn't contain any 0x00 bytes or is delimited by one. LabVIEW strings can also contain more than one 0x00 making its length longer than the number of actual ASCII characters. That is, unfortunately, what the standard VI "Byte array to string" does. It keeps trailing zeros.

The other standard VI "Trim whitespaces" would also not remove the zeros, though they are not ASCII characters.

 

How to get rid of the trailing zeros? Is there no VI for it? Of course I could program something to find the first 0 and split the string, but that's it?

Can someone say, why "Byte array to string" wouldn't remove the trailing zeros?


Viewing all articles
Browse latest Browse all 69434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>