Results for “Strings & byte buffers”
Small, practical examples. Search by task or narrow things down below.
Join words with a separator
Join words with a separator using a complete Go program with explicit sample inputs.
Go✓ Tested
Keep a serial message in flash memory
Arduino / C: The F macro keeps a literal out of scarce SRAM.
Arduino / C✓ Tested
Pad a label with leading zeroes
PowerShell: Use a numeric format specifier to control the displayed width.
PowerShell✓ Tested
Parse a Boolean literal
Parse a Boolean literal in a complete Rust program using the standard library.
Rust✓ Tested
Parse a delimited integer record
Parse a delimited integer record in a complete Rust program using the standard library.
Rust✓ Tested
Parse a hexadecimal integer
Parse a hexadecimal integer in a complete Rust program using the standard library.
Rust✓ Tested
Parse a signed decimal integer
Parse a signed decimal integer in a complete Rust program using the standard library.
Rust✓ Tested
Read a fixed-size serial payload
Arduino / C: readBytes returns the number of bytes actually received.
Arduino / C✓ Tested
Reject an integer with trailing characters
Arduino / C: strtol exposes an end pointer so a parser can require the entire token.
Arduino / C✓ Tested
Remove a prefix only when it matches
Remove a prefix only when it matches in a complete Rust program using the standard library.
Rust✓ Tested
Remove an optional prefix
Remove an optional prefix using a complete Go program with explicit sample inputs.
Go✓ Tested
Replace a literal substring
Replace a literal substring in a complete Rust program using the standard library.
Rust✓ Tested