Results for “save”
Small, practical examples. Search by task or narrow things down below.
Change visual order without changing DOM order
CSS: Order changes flex painting positions while keyboard and reading order still follow the document.
CSS✓ Tested
Check a deterministic result with an assertion
Check a deterministic result with an assertion in a complete Rust program using the standard library.
Rust✓ Tested
Check a filename suffix
Java: Use endsWith for a case-sensitive literal suffix test.
Java✓ Tested
Check a function with table-driven cases
Check a function with table-driven cases using a complete Go program with explicit sample inputs.
Go✓ Tested
Check a literal filename suffix
C: Check lengths before subtracting so a short input cannot produce an invalid pointer.
C✓ Tested
Check a literal prefix in C++17
C++: Use string compare because starts_with was introduced after C++17.
C++✓ Tested
Check a literal string prefix
C: strncmp compares at most the prefix length; both inputs must be valid strings.
C✓ Tested
Check a literal suffix in C++17
C++: Check lengths before subtracting to avoid an unsigned underflow.
C++✓ Tested
Check a script’s syntax without executing its body
Bash Scripts: bash -n parses commands but does not run ordinary script statements.
Bash Scripts✓ Tested
Check a string prefix
Java: Use startsWith to check a literal Java prefix without a regular expression.
Java✓ Tested
Check a string prefix using ordinal comparison
PowerShell: Supply an explicit comparison rule for protocol identifiers.
PowerShell✓ Tested
Check a suffix without case sensitivity
PowerShell: Use an ordinal case-insensitive comparison for a known filename extension.
PowerShell✓ Tested