08-08-2017 04:59 PM
How do I insert special characters in a string? For example I'm trying to insert the hex equivalent of 0x01, 0x04, and 0x00. The hex data is being sent over through a serial connection and the device I'm sending it to needs the data in this format.
Solved! Go to Solution.
08-08-2017 05:05 PM
08-08-2017 05:11 PM
Not sure exactly what you need, but you can use "format into string" for a lot of your string constructing needs. The specifier for hex is just "%x" but we can pad it with a zero using "%02x".
08-09-2017 08:09 AM - edited 08-09-2017 08:10 AM
Okay thank you gregoryj and HopeH. I'll add that into my code.