Results for “tr”
Small, practical examples. Search by task or narrow things down below.
Continue an ordered list at a chosen number
HTML: The start attribute controls the initial ordinal without changing item text.
HTML✓ Tested
Convert a duration to another unit explicitly
C++: duration_cast converts units and truncates fractional integer units.
C++✓ Tested
Convert a supplied ADC count to volts
Arduino / C: Scale a ten-bit ADC count using an explicit reference voltage.
Arduino / C✓ Tested
Convert a variable to uppercase
Bash Scripts: Double caret transforms matching lowercase characters in Bash 4 or later.
Bash Scripts✓ Tested
Convert ASCII text to lowercase safely
C++: Cast each byte to unsigned char before using the cctype function.
C++✓ Tested
Convert ASCII text to uppercase
Convert characters with toupper while avoiding signed-char undefined behavior.
C✓ Tested
Convert between integer bases
JavaScript: Supply a radix when parsing a nondecimal integer string.
JavaScript✓ Tested
Convert between integer bases
TypeScript: Supply a radix when parsing a nondecimal integer string.
TypeScript✓ Tested
Convert Celsius to Fahrenheit
Arduino / C: Use floating-point constants to avoid integer division.
Arduino / C✓ Tested
Convert epoch milliseconds to whole seconds
TypeScript: JavaScript Date stores milliseconds while many APIs use Unix seconds.
TypeScript✓ Tested
Convert known numeric text to an integer
Python: Convert a trusted literal to an integer before adding. Validate external input before converting it.
Python✓ Tested
Convert known numeric text to an integer
C#: Convert a trusted literal to an integer before adding. Validate external input before converting it.
C#✓ Tested