Results for “C”
Small, practical examples. Search by task or narrow things down below.
Convert known numeric text to an integer
JavaScript: Convert a trusted literal to an integer before adding. Validate external input before converting it.
JavaScript✓ Tested
Convert known numeric text to an integer
TypeScript: Convert a trusted literal to an integer before adding. Validate external input before converting it.
TypeScript✓ 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
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
Convert received ASCII letters to uppercase
Arduino / C: ctype functions should receive an unsigned character value.
Arduino / C✓ Tested
Convert tab stops to spaces
Linux Commands: Use expand with a fixed tab width when preparing plain-text alignment.
Linux Commands✓ Tested
Convert text without raising a conversion error
Return NULL when a numeric conversion fails.
TRY_CONVERT✓ Tested
Convert Unix seconds into an aware UTC timestamp
PowerShell: DateTimeOffset.FromUnixTimeSeconds creates a value with an explicit UTC offset.
PowerShell✓ Tested
Convert Unix seconds to an offset-aware timestamp
C#: DateTimeOffset preserves the UTC offset explicitly.
C#✓ Tested
Convert Unix seconds to UTC
Convert Unix seconds to UTC using a complete Go program with explicit sample inputs.
Go✓ Tested
Convert Unix time to a timestamp
Interpret a seconds-since-epoch value as UTC.
unixepoch✓ Tested
Copy a directory while preserving attributes
Linux Commands: Use cp -a for a recursive local copy that preserves links and ordinary file attributes.
Linux Commands✓ Tested