Strings and Text
Read, clean and build text
Clean scanner codes, compare labels, build operator messages with fixed digits, read numbers out of device replies, and check a message checksum.
- 0
Display New Text
EXERCISEDifficultyeasyStatus—unknown - 1
// Removes the carriage return a barcode scanner adds to the end of each code.
Strip the Terminator
EXERCISEDifficultyeasyStatus—unknown - 2
// Compares a printed label with the expected text and reports why they differ.
Check the Label
EXERCISEDifficultymediumStatus—unknown - 3
// Builds a laser marker's serial number, 'SN-0042', from a counter.
Serial Number Text
EXERCISEDifficultymediumStatus—unknown - 4
// Prints a weight with exactly one decimal place, '12.4' and not '12.3999996'.
Weight With One Decimal
EXERCISEDifficultymediumStatus—unknown - 5
// Turns the controller's date and time into an operator message with AM or PM.
Timestamp Message
EXERCISEDifficultymediumStatus—unknown - 6
// Reads a setpoint and an actual value from a controller reply such as 'fg500-34900'.
Two Numbers From a Reply
EXERCISEDifficultymediumStatus—unknown - 7
// Looks up a scanned code in a table of recipe codes and reports its line speed.
Find the Recipe
EXERCISEDifficultymediumStatus—unknown - 8
// Turns the bytes a barcode scanner sends into a STRING without its carriage return.
Scanner Bytes to Text
EXERCISEDifficultymediumStatus—unknown - 9
// Writes a byte as two hex digits, 244 as 'F4' and 10 as '0A'.
Byte to Hex Text
EXERCISEDifficultymediumStatus—unknown - 10
// Shows a temperature with its sign and one decimal place, -12.5 as '-12.5' and -0.5 as '-0.5'.
Temperature With Sign
EXERCISEDifficultymediumStatus—unknown - 11
// Splits a comma-separated reply from a weld controller into five REAL values.
Split a CSV Reply
EXERCISEDifficultyhardStatus—unknown - 12
// Reads a number a device sends as hex text, such as 'A1C8', and rejects text that is not hex.
Hex Text to Number
EXERCISEDifficultyhardStatus—unknown - 13
// Checks the checksum at the end of a GPS sentence before its data is used.
Check a Message Checksum
EXERCISEDifficultyhardStatus—unknown - End
// Shows a new message on a display that reads every byte of the STRING, so nothing of the old one is left.