Results for “Arduino / C”
Small, practical examples. Search by task or narrow things down below.
Format a numeric label with leading zeroes
Bash Scripts: Use a constant printf format string and supply values as separate arguments.
Bash Scripts✓ Tested
Format a timestamp with to_char
Produce a fixed numeric date string.
to_char✓ Tested
Format a UTC timestamp
Format a UTC timestamp using a complete Go program with explicit sample inputs.
Go✓ Tested
Format a zero-padded numeric label
Linux Commands: Use printf formatting instead of concatenating a variable number of zeroes.
Linux Commands✓ Tested
Format an amount in a selected currency
Format an amount in a selected currency with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Format an integer as padded hexadecimal
Format an integer as padded hexadecimal in a complete Rust program using the standard library.
Rust✓ Tested
Format an integer into a caller-owned buffer
C++: to_chars avoids allocation and reports whether the buffer was large enough.
C++✓ Tested
Format decimal output
Use fixed and setprecision to print two C++ decimal places.
C++✓ Tested
Format text in lowercase
Format text in lowercase with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Format whole seconds as hours minutes and seconds
JavaScript: Use integer divisions and remainders for a nonnegative duration.
JavaScript✓ Tested
Format whole seconds as hours minutes and seconds
TypeScript: Use integer divisions and remainders for a nonnegative duration.
TypeScript✓ Tested
Forward all arguments without changing their boundaries
Bash Scripts: Quoted at-sign preserves empty arguments and embedded spaces.
Bash Scripts✓ Tested